Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
61439ad
Preserve IOExtend browser tools and their build sources
mahach666 Nov 25, 2026
b8024e2
Support comparative browser builds with current RvtIO
mahach666 Nov 25, 2026
bc39547
Check progress exposed by the resident RVT reader
mahach666 Nov 25, 2026
81f9e5e
Add an opt-in threaded RVT viewer build
mahach666 Nov 25, 2026
7db5362
Record the public Core Interior viewer comparison
mahach666 Nov 25, 2026
149a980
Record matched wall viewer package checksums
mahach666 Nov 25, 2026
4f14ea6
Recover failed threaded browser opens with a bundled reader
mahach666 Nov 25, 2026
cb4567b
Record the recovered Revit MEP browser view
mahach666 Nov 25, 2026
bb0251b
Share the selected model across browser tools and measure the first f…
mahach666 Nov 26, 2026
cba8bf5
Add a real-model first-frame check for the browser viewer
mahach666 Nov 26, 2026
a0c6116
Record repeated browser first-frame measurements
mahach666 Nov 26, 2026
e0f2fe1
Compare the full browser frame with the updated native HTML export
mahach666 Nov 27, 2026
12ab147
Measure the revealed browser frame on the original model
mahach666 Nov 27, 2026
a1f6373
Add a trimmed RVT-only browser build and verify reader selection
mahach666 Nov 27, 2026
b4ffb52
Reproduce the fast browser path with the public RvtIO fix and time th…
mahach666 Nov 27, 2026
a7378b4
Serve isolated benchmarks locally and verify the exact fast-reader si…
mahach666 Nov 27, 2026
2a3d166
Package parallel RVT decoders for the small-model browser reader
mahach666 Nov 27, 2026
8147761
Add a reproducible first-frame benchmark for the paged RVT reader
mahach666 Nov 27, 2026
476fb05
Bound the fast RVT parameter walk while reporting progress
mahach666 Nov 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ __pycache__/
*.pyc
.venv/

# Local viewer builds, reference exports and benchmark dependencies
/artifacts/

# Editors and OS metadata
.vs/
.idea/
Expand Down
4 changes: 4 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin/
obj/
wwwroot/paged-viewer.html
wwwroot/paged-storage.js
113 changes: 113 additions & 0 deletions site/AUDIT.md

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions site/BrowserFileStream.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System.Runtime.InteropServices.JavaScript;
using System.Runtime.Versioning;

[SupportedOSPlatform("browser")]
internal sealed partial class BrowserFileStream(long length) : Stream
{
private long position;

public override bool CanRead => true;
public override bool CanSeek => true;
public override bool CanWrite => false;
public override long Length => length;

public override long Position
{
get => position;
set
{
ArgumentOutOfRangeException.ThrowIfNegative(value);
position = value;
}
}

public override int Read(byte[] buffer, int offset, int count)
{
ValidateBufferArguments(buffer, offset, count);
return Read(buffer.AsSpan(offset, count));
}

public override int Read(Span<byte> buffer)
{
if (position >= length || buffer.IsEmpty) return 0;
int count = (int)Math.Min(buffer.Length, length - position);
ReadRange(position, buffer[..count]);
position += count;
return count;
}

public override long Seek(long offset, SeekOrigin origin)
{
long start = origin switch
{
SeekOrigin.Begin => 0,
SeekOrigin.Current => position,
SeekOrigin.End => length,
_ => throw new ArgumentOutOfRangeException(nameof(origin)),
};
Position = checked(start + offset);
return position;
}

public override void Flush() { }
public override void SetLength(long value) => throw new NotSupportedException();
public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException();

[JSImport("readRange", "viewer")]
private static partial void ReadRange(
[JSMarshalAs<JSType.Number>] long offset,
[JSMarshalAs<JSType.MemoryView>] Span<byte> destination);
}
84 changes: 84 additions & 0 deletions site/BrowserScratchStream.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
using System.Runtime.InteropServices.JavaScript;
using System.Runtime.Versioning;

[SupportedOSPlatform("browser")]
internal sealed partial class BrowserScratchStream(bool triangles = false) : Stream
{
public override bool CanRead => true;
public override bool CanSeek => true;
public override bool CanWrite => true;
public override long Length => length;
public override long Position
{
get => position;
set
{
ArgumentOutOfRangeException.ThrowIfNegative(value);
position = value;
}
}

private long length;
private long position;

public override int Read(byte[] buffer, int offset, int count)
{
ValidateBufferArguments(buffer, offset, count);
return Read(buffer.AsSpan(offset, count));
}

public override unsafe int Read(Span<byte> buffer)
{
int count = (int)Math.Min(buffer.Length, Math.Max(0, length - position));
if (count == 0) return 0;
fixed (byte* pointer = buffer)
{
int read = Transfer(position, (int)pointer, count, writing: false);
position += read;
return read;
}
}

public override void Write(byte[] buffer, int offset, int count)
{
ValidateBufferArguments(buffer, offset, count);
Write(buffer.AsSpan(offset, count));
}

public override unsafe void Write(ReadOnlySpan<byte> buffer)
{
if (buffer.IsEmpty) return;
fixed (byte* pointer = buffer)
{
int written = Transfer(position, (int)pointer, buffer.Length, writing: true);
if (written != buffer.Length) throw new IOException("Не удалось записать временные данные модели.");
position += written;
length = Math.Max(length, position);
}
}

public override long Seek(long offset, SeekOrigin origin)
{
long start = origin switch
{
SeekOrigin.Begin => 0,
SeekOrigin.Current => position,
SeekOrigin.End => length,
_ => throw new ArgumentOutOfRangeException(nameof(origin)),
};
return Position = checked(start + offset);
}

public override void Flush() { }
public override void SetLength(long value) => throw new NotSupportedException();

private int Transfer(long offset, int address, int count, bool writing) => triangles
? TransferTriangles(offset, address, count, writing)
: TransferPartitions(offset, address, count, writing);

[JSImport("scratchTransfer", "viewer")]
private static partial int TransferPartitions([JSMarshalAs<JSType.Number>] long offset, int address, int count, bool writing);

[JSImport("triangleTransfer", "viewer")]
private static partial int TransferTriangles([JSMarshalAs<JSType.Number>] long offset, int address, int count, bool writing);
}
20 changes: 20 additions & 0 deletions site/DESIGN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Оформление IOExtend Web

Интерфейс наследует графитовый фон, яркие верхние грани и ступенчатую глубину из баннеров IOExtend, IOViewer, RvtIO и NwcIO. Графика опирается на геометрию BIM, а текст и элементы управления используют системный шрифт.

| Назначение | Цвет |
| --- | --- |
| Фон и рабочая поверхность | `#12161c` и `#191e27` |
| Основной и вторичный текст | `#edf3fa` и `#aebaca` |
| Просмотр и IOViewer | `#a5f3fc` |
| Экспорт | `#dbc0ff` |
| Понижение версии Revit | `#ffdc82` |
| Ошибки | `#ffc3ad` |

Акцент инструмента отмечает выбранную вкладку и основное действие. Светлая и тёмная грани кнопок повторяют логику пиксельной графики. На узком экране иллюстрация располагается под действием, а настройки экспорта переходят в одну колонку. Встроенный IOViewer получает ту же палитру панелей через `wwwroot/viewer-theme.js`.

## Графика

- `wwwroot/brand/banner.png` — оригинальный баннер из каталога `profile` репозитория организации. [IOExtend на GitHub](https://github.com/IOExtend)
- `wwwroot/brand/avatar.png` — оригинальный аватар организации. [Аватар IOExtend](https://avatars.githubusercontent.com/u/354825687?s=200&v=4)
- `wwwroot/brand/voxel-building.png` — иллюстрация из прямоугольных объёмов в параллельной проекции. Исходник построения в `artwork/voxel-building.py`.
89 changes: 89 additions & 0 deletions site/IOExtend.Web.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishTrimmed>false</PublishTrimmed>
<WasmBuildNative>false</WasmBuildNative>
<IOExtendFastReader Condition="'$(IOExtendParallelReader)' == 'true'">true</IOExtendFastReader>
<IOExtendAot Condition="'$(IOExtendFastReader)' == 'true'">true</IOExtendAot>
<DefineConstants Condition="'$(IOExtendParallelReader)' == 'true'">$(DefineConstants);PARALLEL_RVT_READER</DefineConstants>
<DefineConstants Condition="'$(IOExtendFastReader)' == 'true'">$(DefineConstants);FAST_RVT_READER</DefineConstants>
<_BuildPagedViewer Condition="'$(IOViewerSource)' != '' and '$(IOExtendFastReader)' != 'true'">true</_BuildPagedViewer>
<RvtIOProgressSource Condition="'$(RvtIOProgressSource)' == ''">../RvtIO</RvtIOProgressSource>
<DefineConstants Condition="'$(RvtIOPartitionScratch)' != 'false'">$(DefineConstants);RVT_PARTITION_SCRATCH</DefineConstants>
<DefineConstants Condition="'$(_BuildPagedViewer)' == 'true'">$(DefineConstants);LOCAL_MESH_PAGES</DefineConstants>
<DefaultItemExcludes>$(DefaultItemExcludes);operations/**;wwwroot/paged-viewer.html;wwwroot/paged-storage.js</DefaultItemExcludes>
<DefaultItemExcludes Condition="'$(IOExtendThreaded)' != 'true'">$(DefaultItemExcludes);wwwroot/thread-isolation.js</DefaultItemExcludes>
</PropertyGroup>
<PropertyGroup Condition="'$(IOExtendAot)' == 'true'">
<TargetFramework Condition="'$(IOExtendThreaded)' != 'true'">net11.0</TargetFramework>
<WasmBuildNative>true</WasmBuildNative>
<RunAOTCompilation>true</RunAOTCompilation>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>
<TrimMode Condition="'$(IOExtendFastReader)' == 'true'">full</TrimMode>
<EmccInitialHeapSize>33554432</EmccInitialHeapSize>
<EmccMaximumHeapSize>4294901760</EmccMaximumHeapSize>
<EmccExtraLDFlags>$(EmccExtraLDFlags) -sMALLOC=dlmalloc</EmccExtraLDFlags>
</PropertyGroup>
<PropertyGroup Condition="'$(IOExtendThreaded)' == 'true'">
<WasmEnableThreads>true</WasmEnableThreads>
</PropertyGroup>
<PropertyGroup Condition="'$(WasmEnableThreads)' == 'true'">
<DefineConstants>$(DefineConstants);BROWSER_THREADS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IOExtendPooledGc)' == 'true'">
<DefineConstants>$(DefineConstants);POOLED_BROWSER_GC</DefineConstants>
<EmccExtraLDFlags>$(EmccExtraLDFlags) -Wl,--wrap=sgen_alloc_os_memory_aligned -Wl,--wrap=sgen_free_os_memory</EmccExtraLDFlags>
</PropertyGroup>
<ItemGroup Condition="'$(IOExtendPooledGc)' == 'true'">
<NativeFileReference Include="$(MSBuildProjectDirectory)/SgenBlockPool.c" />
</ItemGroup>
<ItemGroup>
<Content Include="parallel/reader-decoders.js" Link="wwwroot/reader-decoders.js" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" Condition="'$(IOExtendParallelReader)' == 'true'" />
<PackageReference Include="IOViewer" Version="0.3.1" Condition="'$(IOViewerSource)' == ''" />
<ProjectReference Include="$(IOViewerSource)/src/IOViewer/IOViewer.csproj" Condition="'$(IOViewerSource)' != ''" />
<ProjectReference Include="$(RvtIOProgressSource)/src/RvtIO.Scene/RvtIO.Scene.csproj" />
<PackageReference Include="NwcIO.Scene" Version="0.17.0" Condition="'$(IOExtendFastReader)' != 'true'" />
<Content Include="wwwroot/paged-viewer.html;wwwroot/paged-storage.js" Condition="'$(_BuildPagedViewer)' == 'true'" />
</ItemGroup>
<Target Name="BuildLocalMeshAssets" BeforeTargets="PrepareForBuild" Condition="'$(_BuildPagedViewer)' == 'true'">
<Exec Command="node &quot;$(MSBuildProjectDirectory)/build-paged-viewer.mjs&quot; &quot;$(IOViewerSource)&quot;" />
</Target>
<Target Name="PrepareWebRelease" AfterTargets="Publish">
<Exec Condition="'$(IOExtendFallbackSite)' == ''"
Command="node &quot;$(MSBuildProjectDirectory)/prepare-web-release.mjs&quot; &quot;$(PublishDir)wwwroot&quot;" />
<Exec Condition="'$(IOExtendFallbackSite)' != ''"
Command="node &quot;$(MSBuildProjectDirectory)/prepare-web-release.mjs&quot; &quot;$(PublishDir)wwwroot&quot; &quot;$(IOExtendFallbackSite)&quot;" />
</Target>
<Target Name="WriteReaderProfile" BeforeTargets="AssignTargetPaths">
<Error Condition="'$(IOExtendFastReader)' == 'true' and '$(IOExtendThreaded)' == 'true'"
Text="The fast reader bundle requires a single-threaded coordinator." />
<Error Condition="'$(IOExtendThreaded)' == 'true' and '$(IOExtendAot)' != 'true'"
Text="The threaded browser profile requires IOExtendAot=true." />
<Error Condition="'$(IOExtendThreaded)' == 'true' and '$(IOExtendPooledGc)' == 'true'"
Text="The pooled browser GC profile requires a single-threaded build." />
<Error Condition="'$(IOExtendPooledGc)' == 'true' and '$(IOExtendAot)' != 'true'"
Text="The pooled browser GC profile requires IOExtendAot=true." />
<PropertyGroup>
<_ReaderProfile>$(IntermediateOutputPath)reader-profile.js</_ReaderProfile>
<_UsePooledGc>false</_UsePooledGc>
<_DecoderExport Condition="'$(IOExtendParallelReader)' == 'true'">export * as decoders from './reader-decoders.js'</_DecoderExport>
<_UsePooledGc Condition="'$(IOExtendPooledGc)' == 'true'">true</_UsePooledGc>
<_RvtGcParams>soft-heap-limit=512m</_RvtGcParams>
<_RvtGcParams Condition="'$(_UsePooledGc)' == 'true'">soft-heap-limit=512m,nursery-size=16m</_RvtGcParams>
<_RvtGcParams Condition="'$(_UsePooledGc)' == 'true' and '$(IOExtendFastReader)' == 'true'">soft-heap-limit=2048m,nursery-size=64m</_RvtGcParams>
<_UseThreads>false</_UseThreads>
<_UseThreads Condition="'$(WasmEnableThreads)' == 'true'">true</_UseThreads>
</PropertyGroup>
<MakeDir Directories="$(IntermediateOutputPath)" />
<WriteLinesToFile File="$(_ReaderProfile)" Lines="export const pooledGc = $(_UsePooledGc);export const threaded = $(_UseThreads);export const rvtGcParams = '$(_RvtGcParams)';$(_DecoderExport)" Overwrite="true" WriteOnlyWhenDifferent="true" />
<ItemGroup>
<Content Include="$(_ReaderProfile)" Link="wwwroot/reader-profile.js"
CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>
</Target>
</Project>
Loading