Rebuild local Blender WASM environment and recovery evidence
This commit is contained in:
@@ -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 }
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user