Rebuild local Blender WASM environment and recovery evidence
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

This commit is contained in:
mes123456
2026-08-27 20:15:55 +08:00
parent a081c68c87
commit c2c65d3a09
376 changed files with 241951 additions and 114 deletions

View File

@@ -30,6 +30,7 @@ export type OffscreenViewportRequest =
export type OffscreenViewportResponse =
| { type: "ready" }
| { type: "deviceStatus"; status: "ready" | "lost" | "restoring" }
| { type: "frame"; visiblePixels: number; camera?: ViewportCameraState }
| { type: "snapshotStatus"; nonMeshCount: number; nonMeshBlockedCount: number; greasePencilCount: number; greasePencilBlockedCount: number; greasePencilOnionStrokeCount: number; renderBudget: PBRLightingBudgetReport }
| { type: "textureStatus"; loaded: number; rejected: number; bytes: number; errors: string[]; errorCodes: string[]; budget: PBRTextureBudgetReport }

View File

@@ -137,6 +137,7 @@ export class OffscreenViewportRenderer implements ViewportBackend {
canvas.dataset.pbrProfile = PBR_PROFILE;
canvas.dataset.toneMapping = PBR_TONE_MAPPING;
canvas.dataset.shadowMap = PBR_SHADOW_PROFILE;
canvas.dataset.deviceStatus = "ready";
this.publishInputModal();
}
@@ -335,7 +336,11 @@ export class OffscreenViewportRenderer implements ViewportBackend {
};
private handleMessage(message: OffscreenViewportResponse): void {
if (message.type === "selected") this.onSelect?.(message.objectId, message.additive);
if (message.type === "deviceStatus") {
this.canvas.dataset.deviceStatus = message.status;
if (message.status === "ready") this.canvas.dispatchEvent(new CustomEvent("viewport-device-restored"));
}
else if (message.type === "selected") this.onSelect?.(message.objectId, message.additive);
else if (message.type === "elementSelected") this.onElementSelect?.(message.meshId, message.mode, message.index, message.additive, message.nonMeshKind);
else if (message.type === "greasePencilPointSelected") this.onGreasePencilPointSelect?.(message.point, message.additive, message.baseSelectionRevision);
else if (message.type === "greasePencilSelectionStatus") {