Includes room interior with floor, walls, glass you can see through, and all uncommitted production changes that were running live. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
117 lines
3.2 KiB
TypeScript
117 lines
3.2 KiB
TypeScript
/**
|
|
* Asset mapping for Proinn textures
|
|
* Maps configurator state values to texture file paths
|
|
*/
|
|
|
|
export type MetalTexture = 'antraciet' | 'beige' | 'brons' | 'goud' | 'zwart' | 'ral';
|
|
export type GlassTexture = 'blank' | 'brons-tint' | 'grijs-tint' | 'mat-blank' | 'mat-brons' | 'mat-zwart';
|
|
export type HandleType = 'beugelgreep' | 'geen' | 'hoekgreep' | 'maangreep' | 'ovaalgreep';
|
|
export type DividerType = 'platte-roede' | 't-roede';
|
|
|
|
const TEXTURE_BASE = '/textures/proinn';
|
|
|
|
/**
|
|
* Metal texture mapping
|
|
*/
|
|
export const metalTextures: Record<MetalTexture, string> = {
|
|
antraciet: `${TEXTURE_BASE}/proinn-metaalkleur-antraciet.jpg`,
|
|
beige: `${TEXTURE_BASE}/proinn-metaalkleur-beige.jpg`,
|
|
brons: `${TEXTURE_BASE}/proinn-metaalkleur-brons.jpg`,
|
|
goud: `${TEXTURE_BASE}/proinn-metaalkleur-goud.jpg`,
|
|
zwart: `${TEXTURE_BASE}/proinn-metaalkleur-zwart.jpg`,
|
|
ral: `${TEXTURE_BASE}/proinn-metaalkleur-ral-keuze.jpg`,
|
|
};
|
|
|
|
/**
|
|
* Glass texture mapping
|
|
*/
|
|
export const glassTextures: Record<GlassTexture, string> = {
|
|
'blank': `${TEXTURE_BASE}/proinn-glaskleur-blank.jpg`,
|
|
'brons-tint': `${TEXTURE_BASE}/proinn-glaskleur-brons.jpg`,
|
|
'grijs-tint': `${TEXTURE_BASE}/proinn-glaskleur-grijs.jpg`,
|
|
'mat-blank': `${TEXTURE_BASE}/proinn-glaskleur-mat-blank.jpg`,
|
|
'mat-brons': `${TEXTURE_BASE}/proinn-glaskleur-mat-brons.jpg`,
|
|
'mat-zwart': `${TEXTURE_BASE}/proinn-glaskleur-mat-zwart.jpg`,
|
|
};
|
|
|
|
/**
|
|
* Handle SVG mapping
|
|
*/
|
|
export const handleSVGs: Record<HandleType, string> = {
|
|
beugelgreep: `${TEXTURE_BASE}/proinn-fineer-handgreep-beugelgreep.svg`,
|
|
geen: `${TEXTURE_BASE}/proinn-fineer-handgreep-geen.svg`,
|
|
hoekgreep: `${TEXTURE_BASE}/proinn-fineer-handgreep-hoekgreep.svg`,
|
|
maangreep: `${TEXTURE_BASE}/proinn-fineer-handgreep-maangreep.svg`,
|
|
ovaalgreep: `${TEXTURE_BASE}/proinn-fineer-handgreep-ovaalgreep.svg`,
|
|
};
|
|
|
|
/**
|
|
* Divider SVG mapping
|
|
*/
|
|
export const dividerSVGs: Record<DividerType, string> = {
|
|
'platte-roede': `${TEXTURE_BASE}/proinn-roedetype-platte-roede.svg`,
|
|
't-roede': `${TEXTURE_BASE}/proinn-roedetype-t-roede.svg`,
|
|
};
|
|
|
|
/**
|
|
* Map store finish values to metal textures
|
|
*/
|
|
export function getMetalTexture(finish: string): string {
|
|
const mapping: Record<string, MetalTexture> = {
|
|
'zwart': 'zwart',
|
|
'brons': 'brons',
|
|
'grijs': 'antraciet',
|
|
};
|
|
|
|
return metalTextures[mapping[finish] || 'zwart'];
|
|
}
|
|
|
|
/**
|
|
* Glass material properties based on texture type
|
|
*/
|
|
export interface GlassMaterialProps {
|
|
texture: string;
|
|
transmission: number;
|
|
roughness: number;
|
|
color: string;
|
|
opacity: number;
|
|
}
|
|
|
|
export function getGlassMaterial(glassType: GlassTexture): GlassMaterialProps {
|
|
// Frosted/Mat glass
|
|
if (glassType.startsWith('mat')) {
|
|
return {
|
|
texture: glassTextures[glassType],
|
|
transmission: 0.6,
|
|
roughness: 0.4,
|
|
color: '#ffffff',
|
|
opacity: 0.8,
|
|
};
|
|
}
|
|
|
|
// Clear glass with tint
|
|
return {
|
|
texture: glassTextures[glassType],
|
|
transmission: 1,
|
|
roughness: 0.05,
|
|
color: '#eff6ff',
|
|
opacity: 0.3,
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Proinn color scheme
|
|
*/
|
|
export const proinnColors = {
|
|
primary: '#C4D668',
|
|
primaryDark: '#b5c75a',
|
|
darkest: '#1A2E2E',
|
|
dark: '#2b3937',
|
|
darkMedium: '#3e4b49',
|
|
light: '#e0e5e5',
|
|
lightest: '#F5F5F3',
|
|
gray: '#868c8b',
|
|
error: '#e74242',
|
|
errorDark: '#c40c0c',
|
|
} as const;
|