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

@@ -5,3 +5,5 @@ export { CorrectiveHistoryStore } from "../../protocol/corrective-history-store"
export { createModifierMain, createModifierRegistry } from "../../protocol/corrective-modifier-command";
export { createMeshMain, createMeshRegistry } from "../../protocol/corrective-mesh-command";
export { runCorrectiveFamilyCases, summarizeCorrectiveFamilyResults } from "../../protocol/corrective-family-runner";
export { ATOMIC_CORRECTIVE_FAMILIES, CORRECTIVE_FAMILIES } from "../../protocol/corrective-family-runner";
export { createGenericFamilyMain, createGenericFamilyRegistry } from "../../protocol/corrective-generic-family-command";

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") {

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -577,14 +577,17 @@ workerScope.onmessage = (event): void => {
message.canvas.addEventListener("webglcontextlost", (event) => {
event.preventDefault();
contextLost = true;
post({ type: "deviceStatus", status: "lost" });
post({ type: "volumeStatus", status: "loading", count: 0, errorCode: "WEBGL_CONTEXT_LOST" });
});
message.canvas.addEventListener("webglcontextrestored", () => {
contextLost = false;
post({ type: "deviceStatus", status: "restoring" });
configurePBRRenderer(renderer!);
volumeRenderCache.clear();
void refreshVolumes();
render();
post({ type: "deviceStatus", status: "ready" });
});
configurePBRRenderer(renderer);
scene = new Scene();
@@ -601,6 +604,7 @@ workerScope.onmessage = (event): void => {
scene.add(light, light.target, new GridHelper(20, 20, 0x60656e, 0x383b42), root, importedLights);
resize(message.width, message.height, message.pixelRatio);
post({ type: "ready" });
post({ type: "deviceStatus", status: "ready" });
}
else if (message.type === "snapshot") setSnapshot(message.snapshot, message.geometryBuffers, message.nonMeshGeometryBuffers);
else if (message.type === "textureAssets") applyTextureAssets(message.assets);