diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 23d2d78b5..79bef2c31 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -102,9 +102,11 @@ export { LIBRARY_MATERIAL_REF_PREFIX, MATERIAL_CATALOG, MATERIAL_CATEGORIES, + MATERIAL_SURFACES, type MaterialCatalogItem, type MaterialCategory, type MaterialRef, + type MaterialSurface, type ParsedMaterialRef, parseMaterialRef, SCENE_MATERIAL_REF_PREFIX, diff --git a/packages/core/src/material-library.ts b/packages/core/src/material-library.ts index aa6f7e81a..30240d34d 100644 --- a/packages/core/src/material-library.ts +++ b/packages/core/src/material-library.ts @@ -8,6 +8,11 @@ export type MaterialCatalogItem = { id: string label: string category: MaterialCategory + /** + * Where this finish is appropriate. Absent = universal (e.g. flat colors). + * The paint picker may filter by the slot being painted; v1 shows everything. + */ + surfaces?: MaterialSurface[] description?: string previewThumbnailUrl?: string previewColor?: string @@ -51,14 +56,38 @@ const ROOF_TARGETS: MaterialTarget[] = [ const CEILING_TARGETS: MaterialTarget[] = [MaterialTargetSchema.enum.ceiling] -export const MATERIAL_CATEGORIES = ['wood', 'flooring', 'roof', 'other'] as const +export const MATERIAL_CATEGORIES = [ + 'colors', + 'wood', + 'stone', + 'brick', + 'tile', + 'concrete', + 'metal', + 'fabric', + 'leather', + 'roofing', + 'ground', + 'glass', +] as const export type MaterialCategory = (typeof MATERIAL_CATEGORIES)[number] +export const MATERIAL_SURFACES = [ + 'floor', + 'wall', + 'ceiling', + 'roof', + 'furniture', + 'outdoor', +] as const +export type MaterialSurface = (typeof MATERIAL_SURFACES)[number] + export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'wood-finewood27', label: 'Finewood 27', category: 'wood', + surfaces: ['floor', 'wall', 'furniture'], description: 'Fine wood finish', previewThumbnailUrl: '/material/wood/finewood_27/finewood_27_basecolor.webp', preset: { @@ -96,6 +125,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-floorplank1', label: 'Floor Plank 1', category: 'wood', + surfaces: ['floor'], description: 'Wood plank finish', previewThumbnailUrl: '/material/wood/floor_plank_1/floor_plank-diffuse.webp', preset: { @@ -133,6 +163,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-hungarianparquet10', label: 'Hungarian Parquet 10', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/hungarian_parquet_10/Hungarian Parquet_10_baseColor.webp', preset: { @@ -170,6 +201,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-hungarianparquet2', label: 'Hungarian Parquet 2', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/hungarian_parquet_2/Hungarian Parquet_2_baseColor.webp', preset: { @@ -207,6 +239,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-squareparquet21', label: 'Square Parquet 21', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/square_parquet_21/Square Pattern Parquet_21_baseColor.webp', @@ -246,6 +279,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-squareparquet23', label: 'Square Parquet 23', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/square_wood_parquet_23/Square Pattern Parquet_23_baseColor.webp', @@ -286,6 +320,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodfine1', label: 'Wood Fine 1', category: 'wood', + surfaces: ['floor', 'wall', 'furniture'], description: 'Fine wood finish', previewThumbnailUrl: '/material/wood/wood_fine/wood_fine_1-diffuse.webp', preset: { @@ -323,6 +358,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodfine11', label: 'Wood Fine 11', category: 'wood', + surfaces: ['floor', 'wall', 'furniture'], description: 'Fine wood finish', previewThumbnailUrl: '/material/wood/wood_fine_11/wood_fine_11-diffuse.webp', preset: { @@ -360,6 +396,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodfine13', label: 'Wood Fine 13', category: 'wood', + surfaces: ['floor', 'wall', 'furniture'], description: 'Fine wood finish', previewThumbnailUrl: '/material/wood/wood_fine_13/wood_fine_13-diffuse.webp', preset: { @@ -397,6 +434,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodfine2', label: 'Wood Fine 2', category: 'wood', + surfaces: ['floor', 'wall', 'furniture'], description: 'Fine wood finish', previewThumbnailUrl: '/material/wood/wood_fine_2/wood_fine_2-diffuse.webp', preset: { @@ -434,6 +472,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodfine22', label: 'Wood Fine 22', category: 'wood', + surfaces: ['floor', 'wall', 'furniture'], description: 'Fine wood finish', previewThumbnailUrl: '/material/wood/wood_fine_22/wood_fine_22-diffuse.webp', preset: { @@ -471,6 +510,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodfine24', label: 'Wood Fine 24', category: 'wood', + surfaces: ['floor', 'wall', 'furniture'], description: 'Fine wood finish', previewThumbnailUrl: '/material/wood/wood_fine_24/wood_fine_24-diffuse.webp', preset: { @@ -508,6 +548,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodparquet14', label: 'Wood Parquet 14', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/wood_parquet_14/woodparquet_14_basecolor.webp', preset: { @@ -546,6 +587,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodenparquet11', label: 'Wooden Parquet 11', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/wooden_parquet_11/Classic Parquet_11_baseColor.webp', preset: { @@ -583,6 +625,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodparquet121', label: 'Wood Parquet 121', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/woodparquet_121/woodparquet_121_basecolor.webp', preset: { @@ -620,6 +663,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodparquet56', label: 'Wood Parquet 56', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/woodparquet_56/woodparquet_56_basecolor.webp', preset: { @@ -658,6 +702,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodparquet65', label: 'Wood Parquet 65', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/woodparquet_65/woodparquet_65_BaseColor.webp', preset: { @@ -696,6 +741,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodparquet99', label: 'Wood Parquet 99', category: 'wood', + surfaces: ['floor'], description: 'Parquet wood finish', previewThumbnailUrl: '/material/wood/woodparquet_99/woodparquet_99_basecolor.webp', preset: { @@ -734,6 +780,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodplank19', label: 'Wood Plank 19', category: 'wood', + surfaces: ['floor', 'wall'], description: 'Wood plank finish', previewThumbnailUrl: '/material/wood/woodplank_19/woodplank_19_basecolor.webp', preset: { @@ -771,6 +818,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ id: 'wood-woodplank48', label: 'Wood Plank 48', category: 'wood', + surfaces: ['floor', 'wall'], description: 'Wood plank finish', previewThumbnailUrl: '/material/wood/woodplank_48/woodplank_48_BaseColor.webp', preset: { @@ -807,7 +855,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-tile85a', label: 'Quarry Tile', - category: 'flooring', + category: 'tile', + surfaces: ['floor'], description: 'Floor tile finish', previewThumbnailUrl: '/material/flooring/tile_quarry/tile_quarry_basecolor.webp', preset: { @@ -844,7 +893,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-rusticbrick', label: 'Rustic Brick', - category: 'flooring', + category: 'brick', + surfaces: ['wall', 'floor', 'outdoor'], description: 'Brick finish', previewThumbnailUrl: '/material/flooring/brick_wall_rustic/brick_wall_rustic_basecolor.jpg', preset: { @@ -882,7 +932,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-agedbrick', label: 'Aged Brick', - category: 'flooring', + category: 'brick', + surfaces: ['wall', 'floor', 'outdoor'], description: 'Brick finish', previewThumbnailUrl: '/material/flooring/brick_wall_aged/brick_wall_aged_basecolor.jpg', preset: { @@ -920,7 +971,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-weatheredbrick', label: 'Weathered Brick', - category: 'flooring', + category: 'brick', + surfaces: ['wall', 'floor', 'outdoor'], description: 'Brick finish', previewThumbnailUrl: '/material/flooring/brick_wall_weathered/brick_wall_weathered_basecolor.jpg', @@ -958,7 +1010,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-garagedoor', label: 'Garage Panel', - category: 'flooring', + category: 'metal', + surfaces: ['wall', 'furniture'], description: 'Panel finish', previewThumbnailUrl: '/material/flooring/garage_panel/garage_panel_diffuse.jpg', preset: { @@ -995,7 +1048,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-greenlabradorite', label: 'Green Labradorite', - category: 'flooring', + category: 'stone', + surfaces: ['floor', 'wall'], description: 'Stone flooring finish', previewThumbnailUrl: '/material/flooring/green_labradorite/green_labradorite_diffuse.jpg', preset: { @@ -1032,7 +1086,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-ground13', label: 'Earth Ground', - category: 'flooring', + category: 'ground', + surfaces: ['outdoor', 'floor'], description: 'Ground surface finish', previewThumbnailUrl: '/material/flooring/ground_earth/ground_earth_basecolor.jpg', preset: { @@ -1070,7 +1125,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-pooltiles', label: 'Pool Tiles', - category: 'flooring', + category: 'tile', + surfaces: ['floor', 'outdoor'], description: 'Pool tile finish', previewThumbnailUrl: '/material/flooring/pool_tiles/pool_tiles_diffuse.jpg', preset: { @@ -1107,7 +1163,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-tiles3', label: 'Checker Tiles', - category: 'flooring', + category: 'tile', + surfaces: ['floor'], description: 'Tile flooring finish', previewThumbnailUrl: '/material/flooring/tiles_checker/tiles_checker_diffuse.jpg', preset: { @@ -1144,7 +1201,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-tiles4', label: 'Grid Tiles', - category: 'flooring', + category: 'tile', + surfaces: ['floor'], description: 'Tile flooring finish', previewThumbnailUrl: '/material/flooring/tiles_grid/tiles_grid_diffuse.jpg', preset: { @@ -1181,7 +1239,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-wallstone1', label: 'Stone Wall', - category: 'flooring', + category: 'stone', + surfaces: ['wall', 'floor', 'outdoor'], description: 'Stone finish', previewThumbnailUrl: '/material/flooring/stone_wall/stone_wall_diffuse.webp', preset: { @@ -1218,7 +1277,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-woodenceramic3', label: 'Wooden Ceramic 3', - category: 'flooring', + category: 'tile', + surfaces: ['floor'], description: 'Wood-look ceramic flooring finish', previewThumbnailUrl: '/material/flooring/wooden_ceramic_3/wooden_ceramic-diffuse.webp', preset: { @@ -1255,7 +1315,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-ceramic53', label: 'Ceramic Mosaic', - category: 'flooring', + category: 'tile', + surfaces: ['floor', 'wall'], description: 'Ceramic flooring finish', previewThumbnailUrl: '/material/flooring/ceramic_mosaic/ceramic_mosaic_basecolor.jpg', preset: { @@ -1293,7 +1354,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-terrazzo19', label: 'Terrazzo', - category: 'flooring', + category: 'stone', + surfaces: ['floor', 'wall'], description: 'Terrazzo flooring finish', previewThumbnailUrl: '/material/flooring/terrazzo/terrazzo_basecolor.jpg', preset: { @@ -1330,7 +1392,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-tile79', label: 'Stone Tile', - category: 'flooring', + category: 'stone', + surfaces: ['floor', 'wall'], description: 'Floor tile finish', previewThumbnailUrl: '/material/flooring/tile_stone/tile_stone_basecolor.webp', preset: { @@ -1367,7 +1430,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-tile86', label: 'Terracotta Tile', - category: 'flooring', + category: 'tile', + surfaces: ['floor'], description: 'Floor tile finish', previewThumbnailUrl: '/material/flooring/tile_terracotta/tile_terracotta_basecolor.webp', preset: { @@ -1404,7 +1468,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-greenquartzitea', label: 'Green Quartzite A', - category: 'flooring', + category: 'stone', + surfaces: ['floor', 'wall'], description: 'Green quartzite flooring finish', previewThumbnailUrl: '/material/flooring/green_glass_quartzite/green_glass_quartzite_diffuse.jpg', @@ -1442,7 +1507,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-darkceramic22', label: 'Dark Ceramic Grunge', - category: 'flooring', + category: 'tile', + surfaces: ['floor'], description: 'Dark ceramic flooring finish', previewThumbnailUrl: '/material/flooring/dark_ceramic_grunge/dark_ceramic_grunge_basecolor.jpg', preset: { @@ -1480,7 +1546,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-lightceramic24', label: 'Light Ceramic Grunge', - category: 'flooring', + category: 'tile', + surfaces: ['floor'], description: 'Light ceramic flooring finish', previewThumbnailUrl: '/material/flooring/light_ceramic_grunge/light_ceramic_grunge_basecolor.jpg', @@ -1519,7 +1586,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-statuarettowhite', label: 'Statuaretto White', - category: 'flooring', + category: 'stone', + surfaces: ['floor', 'wall'], description: 'White marble flooring finish', previewThumbnailUrl: '/material/flooring/statuaretto/statuaretto_diffuse.jpg', preset: { @@ -1556,7 +1624,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-tile20', label: 'Mosaic Tile', - category: 'flooring', + category: 'tile', + surfaces: ['floor', 'wall'], description: 'Floor tile finish', previewThumbnailUrl: '/material/flooring/tile_mosaic/tile_mosaic_basecolor.webp', preset: { @@ -1594,7 +1663,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-tile68', label: 'Pattern Tile', - category: 'flooring', + category: 'tile', + surfaces: ['floor', 'wall'], description: 'Floor tile finish', previewThumbnailUrl: '/material/flooring/tile_pattern/tile_pattern_basecolor.webp', preset: { @@ -1632,7 +1702,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-woodenceramic2', label: 'Wooden Ceramic 2', - category: 'flooring', + category: 'tile', + surfaces: ['floor'], description: 'Wood-look ceramic flooring finish', previewThumbnailUrl: '/material/flooring/wooden_ceramic_2/wooden_ceramic-diffuse.webp', preset: { @@ -1669,7 +1740,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'flooring-woodparquet76', label: 'Wood Parquet', - category: 'flooring', + category: 'wood', + surfaces: ['floor'], description: 'Wood parquet flooring finish', previewThumbnailUrl: '/material/flooring/woodparquet/woodparquet_basecolor.webp', preset: { @@ -1707,7 +1779,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'roof-classicshingles', label: 'Classic Shingles', - category: 'roof', + category: 'roofing', + surfaces: ['roof'], description: 'Classic roof shingle finish', previewThumbnailUrl: '/material/roofing/roof_shingles_classic/roof_shingles_classic_basecolor.webp', @@ -1748,7 +1821,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'roof-claytiles', label: 'Clay Tiles', - category: 'roof', + category: 'roofing', + surfaces: ['roof'], description: 'Clay roof tile finish', previewThumbnailUrl: '/material/roofing/roof_tiles_clay/roof_tiles_clay_basecolor.webp', preset: { @@ -1786,7 +1860,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'roof-terracottatiles', label: 'Terracotta Tiles', - category: 'roof', + category: 'roofing', + surfaces: ['roof'], description: 'Terracotta roof tile finish', previewThumbnailUrl: '/material/roofing/roof_tiles_terracotta/roof_tiles_terracotta_basecolor.webp', @@ -1827,7 +1902,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'roof-weatheredshingles', label: 'Weathered Shingles', - category: 'roof', + category: 'roofing', + surfaces: ['roof'], description: 'Weathered roof shingle finish', previewThumbnailUrl: '/material/roofing/roof_shingles_weathered/roof_shingles_weathered_basecolor.webp', @@ -1870,7 +1946,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'preset-white', label: 'White', - category: 'other', + category: 'colors', description: 'Clean painted finish', previewColor: '#ffffff', preset: { @@ -1902,7 +1978,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'preset-softwhite', label: 'Soft White', - category: 'other', + category: 'colors', description: 'Warm off-white painted finish', previewColor: '#f2eee6', preset: { @@ -1934,7 +2010,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'preset-cream', label: 'Cream', - category: 'other', + category: 'colors', description: 'Soft cream painted finish', previewColor: '#efe3cc', preset: { @@ -1966,7 +2042,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'preset-beige', label: 'Beige', - category: 'other', + category: 'colors', description: 'Balanced beige painted finish', previewColor: '#d9c7ad', preset: { @@ -1995,10 +2071,42 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, }, + { + id: 'preset-lightgrey', + label: 'Light grey', + category: 'colors', + description: 'Cool light grey painted finish', + previewColor: '#d8d6d1', + preset: { + maps: {}, + mapProperties: { + color: '#d8d6d1', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, { id: 'preset-greige', label: 'Greige', - category: 'other', + category: 'colors', description: 'Neutral greige painted finish', previewColor: '#c8c1b8', preset: { @@ -2028,15 +2136,15 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, { - id: 'preset-sage', - label: 'Sage', - category: 'other', - description: 'Muted sage painted finish', - previewColor: '#bcc5b2', + id: 'preset-midgrey', + label: 'Mid grey', + category: 'colors', + description: 'Neutral mid grey painted finish', + previewColor: '#8b8a86', preset: { maps: {}, mapProperties: { - color: '#bcc5b2', + color: '#8b8a86', roughness: 0.9, metalness: 0, repeatX: 1, @@ -2060,15 +2168,15 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, { - id: 'preset-softblue', - label: 'Soft Blue', - category: 'other', - description: 'Muted blue painted finish', - previewColor: '#c7d6e3', + id: 'preset-charcoal', + label: 'Charcoal', + category: 'colors', + description: 'Dark charcoal painted finish', + previewColor: '#4e5257', preset: { maps: {}, mapProperties: { - color: '#c7d6e3', + color: '#4e5257', roughness: 0.9, metalness: 0, repeatX: 1, @@ -2092,15 +2200,15 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, { - id: 'preset-terracotta', - label: 'Terracotta', - category: 'other', - description: 'Warm terracotta painted finish', - previewColor: '#c86f4c', + id: 'preset-nearblack', + label: 'Near-black', + category: 'colors', + description: 'Soft near-black painted finish', + previewColor: '#232322', preset: { maps: {}, mapProperties: { - color: '#c86f4c', + color: '#232322', roughness: 0.9, metalness: 0, repeatX: 1, @@ -2124,15 +2232,15 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, { - id: 'preset-dustyrose', - label: 'Dusty Rose', - category: 'other', - description: 'Muted rose painted finish', - previewColor: '#c48a8d', + id: 'preset-blush', + label: 'Blush', + category: 'colors', + description: 'Pale blush painted finish', + previewColor: '#e8c6c0', preset: { maps: {}, mapProperties: { - color: '#c48a8d', + color: '#e8c6c0', roughness: 0.9, metalness: 0, repeatX: 1, @@ -2156,15 +2264,15 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, { - id: 'preset-olive', - label: 'Olive', - category: 'other', - description: 'Natural olive painted finish', - previewColor: '#8d9368', + id: 'preset-tomato', + label: 'Tomato', + category: 'colors', + description: 'Warm tomato red painted finish', + previewColor: '#c0594f', preset: { maps: {}, mapProperties: { - color: '#8d9368', + color: '#c0594f', roughness: 0.9, metalness: 0, repeatX: 1, @@ -2188,15 +2296,15 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, { - id: 'preset-forest', - label: 'Forest', - category: 'other', - description: 'Deep forest green painted finish', - previewColor: '#4f6b57', + id: 'preset-brickred', + label: 'Brick red', + category: 'colors', + description: 'Deep brick red painted finish', + previewColor: '#9e3b34', preset: { maps: {}, mapProperties: { - color: '#4f6b57', + color: '#9e3b34', roughness: 0.9, metalness: 0, repeatX: 1, @@ -2220,15 +2328,15 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, { - id: 'preset-slateblue', - label: 'Slate Blue', - category: 'other', - description: 'Muted slate blue painted finish', - previewColor: '#6f87a4', + id: 'preset-oxblood', + label: 'Oxblood', + category: 'colors', + description: 'Dark oxblood painted finish', + previewColor: '#6f2c2a', preset: { maps: {}, mapProperties: { - color: '#6f87a4', + color: '#6f2c2a', roughness: 0.9, metalness: 0, repeatX: 1, @@ -2252,15 +2360,143 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, { - id: 'preset-navy', - label: 'Navy', - category: 'other', - description: 'Classic navy painted finish', - previewColor: '#2f4865', + id: 'preset-peach', + label: 'Peach', + category: 'colors', + description: 'Soft peach painted finish', + previewColor: '#f0c3a0', preset: { maps: {}, mapProperties: { - color: '#2f4865', + color: '#f0c3a0', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-terracotta', + label: 'Terracotta', + category: 'colors', + description: 'Warm terracotta painted finish', + previewColor: '#c86f4c', + preset: { + maps: {}, + mapProperties: { + color: '#c86f4c', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-burntorange', + label: 'Burnt orange', + category: 'colors', + description: 'Burnt orange painted finish', + previewColor: '#b25a2c', + preset: { + maps: {}, + mapProperties: { + color: '#b25a2c', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-clay', + label: 'Clay', + category: 'colors', + description: 'Deep clay painted finish', + previewColor: '#8f4a2e', + preset: { + maps: {}, + mapProperties: { + color: '#8f4a2e', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-paleyellow', + label: 'Pale yellow', + category: 'colors', + description: 'Pale yellow painted finish', + previewColor: '#f2e3b3', + preset: { + maps: {}, + mapProperties: { + color: '#f2e3b3', roughness: 0.9, metalness: 0, repeatX: 1, @@ -2286,7 +2522,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'preset-mustard', label: 'Mustard', - category: 'other', + category: 'colors', description: 'Warm mustard painted finish', previewColor: '#c8a449', preset: { @@ -2316,15 +2552,815 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ }, }, { - id: 'preset-charcoal', - label: 'Charcoal', - category: 'other', - description: 'Dark charcoal painted finish', - previewColor: '#4e5257', + id: 'preset-ochre', + label: 'Ochre', + category: 'colors', + description: 'Warm ochre painted finish', + previewColor: '#b8852f', preset: { maps: {}, mapProperties: { - color: '#4e5257', + color: '#b8852f', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-gold', + label: 'Gold', + category: 'colors', + description: 'Deep gold painted finish', + previewColor: '#9c7320', + preset: { + maps: {}, + mapProperties: { + color: '#9c7320', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-mint', + label: 'Mint', + category: 'colors', + description: 'Soft mint painted finish', + previewColor: '#cfe0cf', + preset: { + maps: {}, + mapProperties: { + color: '#cfe0cf', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-sage', + label: 'Sage', + category: 'colors', + description: 'Muted sage painted finish', + previewColor: '#bcc5b2', + preset: { + maps: {}, + mapProperties: { + color: '#bcc5b2', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-olive', + label: 'Olive', + category: 'colors', + description: 'Natural olive painted finish', + previewColor: '#8d9368', + preset: { + maps: {}, + mapProperties: { + color: '#8d9368', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-forest', + label: 'Forest', + category: 'colors', + description: 'Deep forest green painted finish', + previewColor: '#4f6b57', + preset: { + maps: {}, + mapProperties: { + color: '#4f6b57', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-paleteal', + label: 'Pale teal', + category: 'colors', + description: 'Pale teal painted finish', + previewColor: '#b9d2cf', + preset: { + maps: {}, + mapProperties: { + color: '#b9d2cf', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-teal', + label: 'Teal', + category: 'colors', + description: 'Balanced teal painted finish', + previewColor: '#4f8a86', + preset: { + maps: {}, + mapProperties: { + color: '#4f8a86', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-deepteal', + label: 'Deep teal', + category: 'colors', + description: 'Deep teal painted finish', + previewColor: '#2f5f5c', + preset: { + maps: {}, + mapProperties: { + color: '#2f5f5c', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-powderblue', + label: 'Powder blue', + category: 'colors', + description: 'Powder blue painted finish', + previewColor: '#cddce8', + preset: { + maps: {}, + mapProperties: { + color: '#cddce8', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-softblue', + label: 'Soft Blue', + category: 'colors', + description: 'Muted blue painted finish', + previewColor: '#c7d6e3', + preset: { + maps: {}, + mapProperties: { + color: '#c7d6e3', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-sky', + label: 'Sky', + category: 'colors', + description: 'Sky blue painted finish', + previewColor: '#8fb4d4', + preset: { + maps: {}, + mapProperties: { + color: '#8fb4d4', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-slateblue', + label: 'Slate Blue', + category: 'colors', + description: 'Muted slate blue painted finish', + previewColor: '#6f87a4', + preset: { + maps: {}, + mapProperties: { + color: '#6f87a4', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-royalblue', + label: 'Royal blue', + category: 'colors', + description: 'Royal blue painted finish', + previewColor: '#3a5a9c', + preset: { + maps: {}, + mapProperties: { + color: '#3a5a9c', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-navy', + label: 'Navy', + category: 'colors', + description: 'Classic navy painted finish', + previewColor: '#2f4865', + preset: { + maps: {}, + mapProperties: { + color: '#2f4865', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-lavender', + label: 'Lavender', + category: 'colors', + description: 'Soft lavender painted finish', + previewColor: '#c9c2da', + preset: { + maps: {}, + mapProperties: { + color: '#c9c2da', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-plum', + label: 'Plum', + category: 'colors', + description: 'Muted plum painted finish', + previewColor: '#6d4a63', + preset: { + maps: {}, + mapProperties: { + color: '#6d4a63', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-aubergine', + label: 'Aubergine', + category: 'colors', + description: 'Deep aubergine painted finish', + previewColor: '#594354', + preset: { + maps: {}, + mapProperties: { + color: '#594354', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-petal', + label: 'Petal', + category: 'colors', + description: 'Pale petal pink painted finish', + previewColor: '#f0d3da', + preset: { + maps: {}, + mapProperties: { + color: '#f0d3da', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-rose', + label: 'Rose', + category: 'colors', + description: 'Muted rose painted finish', + previewColor: '#cf8fa6', + preset: { + maps: {}, + mapProperties: { + color: '#cf8fa6', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-dustyrose', + label: 'Dusty Rose', + category: 'colors', + description: 'Muted rose painted finish', + previewColor: '#c48a8d', + preset: { + maps: {}, + mapProperties: { + color: '#c48a8d', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-berry', + label: 'Berry', + category: 'colors', + description: 'Deep berry painted finish', + previewColor: '#8f4a5a', + preset: { + maps: {}, + mapProperties: { + color: '#8f4a5a', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-sand', + label: 'Sand', + category: 'colors', + description: 'Warm sand painted finish', + previewColor: '#ddccae', + preset: { + maps: {}, + mapProperties: { + color: '#ddccae', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-tan', + label: 'Tan', + category: 'colors', + description: 'Natural tan painted finish', + previewColor: '#c4a87f', + preset: { + maps: {}, + mapProperties: { + color: '#c4a87f', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-taupe', + label: 'Taupe', + category: 'colors', + description: 'Earthy taupe painted finish', + previewColor: '#8f7a64', + preset: { + maps: {}, + mapProperties: { + color: '#8f7a64', + roughness: 0.9, + metalness: 0, + repeatX: 1, + repeatY: 1, + rotation: 0, + wrapS: 'Repeat', + wrapT: 'Repeat', + normalScaleX: 1, + normalScaleY: 1, + emissiveIntensity: 1, + displacementScale: 0.02, + transparent: false, + flipY: true, + bumpScale: 1, + emissiveColor: '#000000', + aoMapIntensity: 1, + side: 0, + opacity: 1, + lightMapIntensity: 1, + }, + }, + }, + { + id: 'preset-espresso', + label: 'Espresso', + category: 'colors', + description: 'Dark espresso painted finish', + previewColor: '#4a382c', + preset: { + maps: {}, + mapProperties: { + color: '#4a382c', roughness: 0.9, metalness: 0, repeatX: 1, @@ -2350,7 +3386,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'preset-metal', label: 'Metal', - category: 'other', + category: 'metal', + surfaces: ['furniture', 'wall'], description: 'Brushed metal finish', previewColor: '#c0c0c0', preset: { @@ -2382,7 +3419,7 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [ { id: 'preset-glass', label: 'Glass', - category: 'other', + category: 'glass', description: 'Light glass finish', previewColor: '#87ceeb', preset: { diff --git a/packages/editor/src/components/ui/controls/material-picker.tsx b/packages/editor/src/components/ui/controls/material-picker.tsx index f3d4b129a..90487cb4d 100644 --- a/packages/editor/src/components/ui/controls/material-picker.tsx +++ b/packages/editor/src/components/ui/controls/material-picker.tsx @@ -9,8 +9,8 @@ import { type MaterialTarget, toLibraryMaterialRef, } from '@pascal-app/core' -import { useEffect, useRef, useState } from 'react' -import { CURATED_COLORS } from '../../../lib/colors' +import { useEffect, useState } from 'react' +import { triggerSFX } from '../../../lib/sfx-bus' import useEditor from '../../../store/use-editor' type MaterialPickerProps = { @@ -24,7 +24,6 @@ type MaterialPickerProps = { } function getCategoryLabel(category: (typeof MATERIAL_CATEGORIES)[number]) { - if (category === 'roof') return 'Roofing' return category.charAt(0).toUpperCase() + category.slice(1) } @@ -40,11 +39,10 @@ export function MaterialPicker({ const [selectedCategory, setSelectedCategory] = useState<(typeof MATERIAL_CATEGORIES)[number]>( MATERIAL_CATEGORIES[0], ) - const categoryScrollRef = useRef(null) - const catalogItems = - selectedCategory === 'other' - ? getMaterialsForCategory('other') - : getMaterialsForCategory(selectedCategory) + const availableCategories = MATERIAL_CATEGORIES.filter( + (category) => getMaterialsForCategory(category).length > 0, + ) + const catalogItems = getMaterialsForCategory(selectedCategory) useEffect(() => { setShowCustom(!!value?.properties && !selectedMaterialPreset) @@ -52,7 +50,7 @@ export function MaterialPicker({ useEffect(() => { if (!selectedMaterialPreset && value?.properties) { - setSelectedCategory('other') + setSelectedCategory('colors') return } @@ -68,7 +66,6 @@ export function MaterialPicker({ selectedMaterialPreset ?? (value?.id ? toLibraryMaterialRef(value.id) : undefined) const selectedCatalogMaterialId = getLibraryMaterialIdFromRef(selectedCatalogId) ?? undefined const selectedCatalogEntry = getCatalogMaterialById(selectedCatalogMaterialId) - const selectedColor = value?.properties?.color.toLowerCase() const handleCatalogSelect = (materialId: string) => { if (disabled) return @@ -77,44 +74,6 @@ export function MaterialPicker({ onSelectMaterialPreset?.(toLibraryMaterialRef(materialId)) } - const handleColorSelect = (hex: string) => { - if (disabled) return - setShowCustom(false) - setPaintPanelOpen(false) - onChange?.({ - preset: 'custom', - properties: { - color: hex, - roughness: 0.6, - metalness: 0, - opacity: 1, - transparent: false, - side: 'front', - }, - }) - } - - useEffect(() => { - const container = categoryScrollRef.current - if (!container) return - - const handleWheel = (event: WheelEvent) => { - const deltaX = event.deltaX - const deltaY = event.deltaY - const nextScrollLeft = container.scrollLeft + deltaX + deltaY - - if (nextScrollLeft === container.scrollLeft) return - - event.preventDefault() - container.scrollLeft = nextScrollLeft - } - - container.addEventListener('wheel', handleWheel, { passive: false }) - return () => { - container.removeEventListener('wheel', handleWheel) - } - }, []) - const handleCustomOpen = () => { if (disabled) return setShowCustom(true) @@ -139,108 +98,87 @@ export function MaterialPicker({
{(catalogItems.length > 0 || onChange) && (
- {onChange ? ( -
-
- Colors -
-
- {CURATED_COLORS.map((color) => { - const isSelected = selectedColor === color.hex.toLowerCase() - return ( -
-
- ) : null} +
+ {availableCategories.map((category) => ( + + ))} +
-
- {MATERIAL_CATEGORIES.map((category) => ( + {catalogItems.map((item) => { + const isSelected = selectedCatalogId === toLibraryMaterialRef(item.id) + return ( - ))} -
-
-
- {catalogItems.map((item) => ( - - ))} - {selectedCategory === 'other' && onChange ? ( + ) + })} + {selectedCategory === 'colors' && onChange ? ( ) : null}
diff --git a/packages/editor/src/lib/colors.ts b/packages/editor/src/lib/colors.ts deleted file mode 100644 index 9ab5bcce0..000000000 --- a/packages/editor/src/lib/colors.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const CURATED_COLORS = [ - { name: 'Warm white', hex: '#f5f1e8' }, - { name: 'Soft linen', hex: '#e9ddcf' }, - { name: 'Stone', hex: '#c8c2b8' }, - { name: 'Clay beige', hex: '#b9a58f' }, - { name: 'Greige', hex: '#9d9488' }, - { name: 'Charcoal', hex: '#3c3c3a' }, - { name: 'Mushroom', hex: '#a38f7b' }, - { name: 'Terracotta', hex: '#b7654b' }, - { name: 'Muted ochre', hex: '#c29b52' }, - { name: 'Sage', hex: '#8d9b82' }, - { name: 'Olive gray', hex: '#68715f' }, - { name: 'Dusty blue', hex: '#7d91a3' }, - { name: 'Slate teal', hex: '#4f7372' }, - { name: 'Aubergine', hex: '#594354' }, -] as const