generate_mock_asset
Generates custom mock 2D PNG assets for game prototypes, with gradients, patterns, rotated text, and transparency. Embeds JSON metadata for later inspection.
Instructions
Generates a single advanced custom mock 2D PNG asset (supports gradients, patterns, text rotation, transparency, and auto-scaling) for game prototypes. Embeds JSON metadata into the PNG (dimensions, color, shape, description) readable by read_image_metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to display on the asset | |
| color | Yes | Background hex color code, e.g., '#FF5733' | |
| shape | No | The geometric shape of the asset. Default is rectangle when missing. | rectangle |
| width | No | Width in pixels. Default is 128 when missing. | |
| height | No | Height in pixels. Default is 128 when missing. | |
| opacity | No | Opacity of the background shape from 0.0 (transparent) to 1.0 (opaque). Default is 1.0 when missing. | |
| pattern | No | Optional pattern overlay. Default is none when missing. | none |
| filename | Yes | Name of the file, e.g., 'player_idle.png' | |
| fillMode | No | Background fill mode. Default is solid when missing. | solid |
| fontSize | No | Optional explicit font size in pixels. If omitted, it auto-scales to fit. | |
| directory | Yes | Absolute path to the target project folder | |
| textColor | No | Optional hex color for the text. If omitted, a contrasting color (black or white) will be automatically calculated based on the background. | |
| trackColor | No | Background color for the unfilled portion of the asset when fillPercent < 100. Hex code, e.g., '#333333' | |
| fillPercent | No | Percentage of the asset to fill, useful for health or progress bars (0-100). Default is 100. | |
| strokeColor | No | Color of the asset border hex code. Default is #000000 when missing. | #000000 |
| strokeWidth | No | Width of the asset border in pixels. Set to 0 for no border. Default is 4 when missing. | |
| patternColor | No | Pattern color. If omitted, a derived contrast color will be used. | |
| patternScale | No | Pattern tile size in pixels. Default is 16 when missing. | |
| textPosition | No | Vertical alignment of the text. Default is center when missing. | center |
| textRotation | No | Rotation angle for the text in degrees. Default is 0 when missing. | |
| gradientAngle | No | Angle for linear gradients in degrees. Ignored for radial gradients. Default is 45 when missing. | |
| patternOpacity | No | Pattern overlay opacity from 0.0 to 1.0. Default is 0.18 when missing. | |
| secondaryColor | No | Secondary color used for gradients. If omitted, a derived variant of color will be used. | |
| assetDescription | No | Human-readable description of this asset stored as image metadata. Useful for models without vision to understand the asset later. E.g. 'Player idle placeholder, blue rectangle 128x128' |