import type { MaterialIR, WorldIR } from "../../../protocol/scene-ir"; import type { GPUTextureAsset } from "../../../protocol/render-assets"; import type { ShaderCompileReport } from "../../../protocol/shader-compiler"; export type MaterialPreviewRequest = | { type: "init"; width: number; height: number } | { type: "render"; requestId: string; material?: MaterialIR; textures: GPUTextureAsset[]; world?: WorldIR } | { type: "dispose" }; export type MaterialPreviewResponse = | { type: "ready" } | { type: "preview"; requestId: string; png: ArrayBuffer; width: number; height: number; compile?: ShaderCompileReport; backend: "THREE_WEBGL2" } | { type: "error"; requestId?: string; message: string };