feat(PBR): extract Blender PBR properties and apply in 3D viewer
Extract Base Color, Metallic, Roughness, Transmission, IOR from Blender asset library materials via catalog_assets.py. Store in catalog JSON and serve via /api/asset-libraries/pbr-map endpoint. Frontend viewers apply PBR properties to Three.js MeshStandardMaterial using hex color strings (avoiding Three.js ColorManagement sRGB/linear issues). Key fixes: - RLS bypass for material alias lookup in pbr-map endpoint - pbrMap empty guard prevents premature grey fallback in viewers - Cache-Control: no-cache on pbr-map requests to avoid stale data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -241,14 +241,17 @@ function LibraryCard({ lib }: { lib: AssetLibrary }) {
|
||||
</button>
|
||||
{expanded && (
|
||||
<div className="mt-2 flex flex-wrap gap-1">
|
||||
{lib.catalog.materials.slice(0, MAX_VISIBLE).map((m) => (
|
||||
<span
|
||||
key={m}
|
||||
className="text-xs px-2 py-0.5 rounded bg-surface-alt border border-border-default text-content-secondary font-mono"
|
||||
>
|
||||
{m}
|
||||
</span>
|
||||
))}
|
||||
{lib.catalog.materials.slice(0, MAX_VISIBLE).map((m) => {
|
||||
const name = typeof m === 'string' ? m : m.name
|
||||
return (
|
||||
<span
|
||||
key={name}
|
||||
className="text-xs px-2 py-0.5 rounded bg-surface-alt border border-border-default text-content-secondary font-mono"
|
||||
>
|
||||
{name}
|
||||
</span>
|
||||
)
|
||||
})}
|
||||
{materialCount > MAX_VISIBLE && (
|
||||
<span className="text-xs px-2 py-0.5 rounded bg-surface-muted text-content-muted">
|
||||
... and {materialCount - MAX_VISIBLE} more
|
||||
|
||||
Reference in New Issue
Block a user