feat(web): complete PBR shader, asset library and offscreen render chain
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

- generate a desktop-Blender PBR asset library and seed catalog v2 into OPFS
- add React asset browser, material preview sphere and Web PBR render panel
- extend shader graph/compiler to the finite 14-node set and native properties
- add image colour-space editing, scene-camera still rendering and asset repair
- add focused E2E/unit coverage and implementation status notes

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-11 14:59:43 +08:00
parent d1e6b63d54
commit a078648297
65 changed files with 6083 additions and 157 deletions

View File

@@ -4,6 +4,7 @@ import type { RecentProjectIssue, RecentProjectRecord } from "./recent-projects"
import type { StorageBudgetBreakdown } from "./storage-budget";
import type { ErrorCode } from "./error";
import type { TexturePaintTileBindingRequestIR, TexturePaintTileBindingResultIR, TexturePaintTileCommitIR, TexturePaintTileCommitResultIR } from "./texture-paint-asset";
import type { AssetCatalogManifestV2IR, AssetCatalogV2PreviewIR } from "./asset-catalog-v2";
export interface StorageSmokeResult {
backend: "indexeddb";
@@ -141,6 +142,39 @@ export interface StorageAssetListResult {
assets: StorageAssetRecord[];
}
export interface StorageAssetCatalogSeedIR {
schemaVersion: 1;
seedId: string;
revision: number;
librarySha256: string;
sourcePath: string;
}
export interface StorageAssetCatalogResult {
manifest: AssetCatalogManifestV2IR | null;
seed: StorageAssetCatalogSeedIR | null;
}
export interface StorageAssetCatalogPreviewReadResult {
projectId: string;
sha256: string;
data: ArrayBuffer;
}
export interface StorageAssetCatalogCommitResult {
manifest: AssetCatalogManifestV2IR;
preview: AssetCatalogV2PreviewIR;
deduplicated: boolean;
receipt: {
schemaVersion: number;
assetId: string;
committedRevision: number;
contentSha256: string;
contentByteLength: number;
opfsPath: string;
};
}
export interface StorageLODResult {
projectId: string;
cacheKey: string;
@@ -261,6 +295,10 @@ export interface StorageRequest {
| { type: "putAsset"; projectId: string; data: ArrayBuffer; mimeType: string; sourcePath?: string; faultAt?: "quota" }
| { type: "readAsset"; projectId: string; sha256: string }
| { type: "listAssets"; projectId: string }
| { type: "getAssetCatalog" }
| { type: "seedAssetCatalog"; projectId: string; manifest: unknown; library: ArrayBuffer; previews: Array<{ sha256: string; data: ArrayBuffer }>; seedId: string; repair?: boolean }
| { type: "readAssetCatalogPreview"; projectId: string; sha256: string }
| { type: "commitAssetCatalogPreview"; projectId: string; expectedRevision: number; identity: unknown; data: ArrayBuffer }
| { type: "commitTexturePaintTile"; commit: TexturePaintTileCommitIR }
| { type: "readTexturePaintTileBinding"; request: TexturePaintTileBindingRequestIR }
| { type: "saveLOD"; projectId: string; cacheKey: string; data: ArrayBuffer }
@@ -283,7 +321,7 @@ export interface StorageRequest {
export interface StorageResponse {
requestId: string;
ok: boolean;
result?: StorageSmokeResult | StorageInfoResult | StorageBudgetResult | StorageRecentProjectsResult | StorageProjectResult | StorageProjectCleanupResult | StorageSaveResult | StorageRecoveryResult | StorageProjectReadResult | StorageOperationResult | StorageOperationListResult | StorageOperationPruneResult | StorageSnapshotResult | StorageSnapshotListResult | StorageSnapshotReadResult | StorageAssetPutResult | StorageAssetReadResult | StorageAssetListResult | TexturePaintTileCommitResultIR | TexturePaintTileBindingResultIR | StorageLODResult | StorageLODManifestResult | StorageLODManifestListResult | StorageLODReadResult | StorageLODPruneResult | StorageSimulationCacheResult | StorageSimulationCacheReadResult | StorageSimulationCacheFrameReadResult | StorageSimulationCachePlaybackReadyResult | StorageSimulationCachePlaybackReleaseResult | StorageSimulationCachePruneResult | StorageSimulationCacheListResult;
result?: StorageSmokeResult | StorageInfoResult | StorageBudgetResult | StorageRecentProjectsResult | StorageProjectResult | StorageProjectCleanupResult | StorageSaveResult | StorageRecoveryResult | StorageProjectReadResult | StorageOperationResult | StorageOperationListResult | StorageOperationPruneResult | StorageSnapshotResult | StorageSnapshotListResult | StorageSnapshotReadResult | StorageAssetPutResult | StorageAssetReadResult | StorageAssetListResult | StorageAssetCatalogResult | StorageAssetCatalogPreviewReadResult | StorageAssetCatalogCommitResult | TexturePaintTileCommitResultIR | TexturePaintTileBindingResultIR | StorageLODResult | StorageLODManifestResult | StorageLODManifestListResult | StorageLODReadResult | StorageLODPruneResult | StorageSimulationCacheResult | StorageSimulationCacheReadResult | StorageSimulationCacheFrameReadResult | StorageSimulationCachePlaybackReadyResult | StorageSimulationCachePlaybackReleaseResult | StorageSimulationCachePruneResult | StorageSimulationCacheListResult;
error?: string;
errorCode?: ErrorCode;
}