e.preventDefault()}
+ ondrop={onDrop}
+ >
+ {#each segments as seg (seg.level)}
+
+ {/each}
+ {#if info.block.cull}
+
+ Culled
+
+ {/if}
+ {#each info.levels as l, i (i)}
+ {#if i < info.levels.length - 1 || info.block.cull}
+
+ {/if}
+ {/each}
+
+
+
+
+
+ LOD{sel}
+ previewing on this screen
+
+
{sourceLabel(level)} · {level.tris != null ? level.tris + ' tris' : level.status}
+ {#if level.error}
{level.error}
{/if}
+ {#if sel === 0}
+
LOD0 is the object itself — edit it with the rest of this panel.
+ {:else}
+ {#if level.source === 'generated'}
+
(ratioDraft = v / 100)}
+ onscrubend={() => updateLodLevel(uuid, /** @type {number} */ (sel), { ratio: ratioDraft })}
+ />
+
+ {/if}
+
+ Replace with
+ {
+ if (!v || sel === null) return;
+ if (v === '__generated') replaceLodLevel(uuid, sel, { source: 'generated', ratio: level.ratio ?? 0.5 });
+ else replaceLodLevel(uuid, sel, { source: 'object', ref: v });
+ }}
+ />
+
+ …or drop a model from the Explorer on the bar.
+
+ {#if $lodLevelGizmo?.uuid === uuid && $lodLevelGizmo?.level === sel}
+
+ {:else}
+
+ {/if}
+ {#if level.offset}
+
+ {/if}
+
+
+
+ {#if level.material}
+
+ Colour
+ updateLodLevel(uuid, /** @type {number} */ (sel), { material: { ...level.material, color: e.currentTarget.value } })}
+ />
+
+ updateLodLevel(uuid, /** @type {number} */ (sel), { material: { ...level.material, roughness: v } })}
+ />
+ updateLodLevel(uuid, /** @type {number} */ (sel), { material: { ...level.material, metalness: v } })}
+ />
+ {/if}
+ {/if}
+
+ {:else}
+ Click a level on the bar to select it: the viewport shows that level while it is selected.
+ {/if}
+
+