@@ -11,6 +11,7 @@ Images are stacked in layers (like Photoshop layers):
|
||||
2. **Door Layer** - The door panel (PNG with transparency) - changes with color selection
|
||||
3. **Hardware Layer** - Handle/lock set (PNG with transparency) - can flip for left/right hinge
|
||||
4. **Overlay Layer** - Glass view/decorative elements (PNG with transparency) - optional
|
||||
5. **Foreground Layer** - Plants, decorative items that appear in front (PNG with transparency) - optional
|
||||
|
||||
### Fallback Behavior
|
||||
- **No layered config**: Shows the standard flat `image` field
|
||||
@@ -83,6 +84,32 @@ Images are stacked in layers (like Photoshop layers):
|
||||
}
|
||||
```
|
||||
|
||||
### Product with Foreground Layer (Plants/Decorative Elements)
|
||||
```json
|
||||
{
|
||||
"productCode": "600",
|
||||
"description": "#600 PREMIUM ENTRY DOOR",
|
||||
"image": "images/600.jpg",
|
||||
"colors": ["White", "Black", "Bronze"],
|
||||
"materials": ["Aluminum"],
|
||||
"imageConfig": {
|
||||
"layered": true,
|
||||
"basePath": "images/products/600/",
|
||||
"layers": {
|
||||
"base": "base.jpg",
|
||||
"door": {
|
||||
"white": "door-white.png",
|
||||
"black": "door-black.png",
|
||||
"bronze": "door-bronze.png"
|
||||
},
|
||||
"hardware": "handle.png",
|
||||
"foreground": "plants.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
**Note:** The foreground layer appears on top of all other layers and is perfect for adding plants, decorative elements, or other items that should appear in front of the product.
|
||||
|
||||
## File Structure
|
||||
|
||||
### Recommended Directory Layout
|
||||
@@ -97,6 +124,13 @@ app/images/products/
|
||||
│ ├── handle.png # Hardware (transparent BG)
|
||||
│ ├── view-inside.png # Optional inside view overlay
|
||||
│ └── view-outside.png # Optional outside view overlay
|
||||
├── 600/
|
||||
│ ├── base.jpg # Frame/house background
|
||||
│ ├── door-white.png # White door panel (transparent BG)
|
||||
│ ├── door-black.png # Black door panel (transparent BG)
|
||||
│ ├── door-bronze.png # Bronze door panel (transparent BG)
|
||||
│ ├── handle.png # Hardware (transparent BG)
|
||||
│ └── plants.png # Foreground layer - plants/decorative (transparent BG)
|
||||
├── 450/
|
||||
│ ├── base.jpg
|
||||
│ └── door-white.png
|
||||
|
||||
Reference in New Issue
Block a user