# Threejs Image Generator

Generate and edit 2D image assets for Three.js games with Google's Gemini image API...

- Repository: https://github.com/majidmanzarpour/threejs-game-skills (2657 stars)
- Category: Marketing
- License: MIT
- Last updated: 2026-09-28
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add majidmanzarpour/threejs-game-skills --skill threejs-image-generator -g -a claude-code -y`
Codex: `npx skills add majidmanzarpour/threejs-game-skills --skill threejs-image-generator -g -a codex -y`
Cursor: `npx skills add majidmanzarpour/threejs-game-skills --skill threejs-image-generator -g -a cursor -y`
Gemini CLI: `npx skills add majidmanzarpour/threejs-game-skills --skill threejs-image-generator -g -a gemini-cli -y`

## Description

Generate and edit 2D image assets for Three.js games with Google's Gemini image API: concept sheets, image-to-3D inputs, texture and material references, sky and background plates, decals, logos, icons, GUI art, title and menu art, and marketing stills. Also use for direct image editing when the user supplies an image path.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Three.js Image Generator

The 2D layer for Three.js games: concepts, textures, decals, UI art, and the source images that feed `threejs-3d-generator` for image-to-3D.

Resolve `<this-skill-dir>` from the actual loaded skill file. Resolve sibling skills beside it first, then use the runner's discovered paths. Do not mix installed versions or assume a particular home directory.

## When to use

- Image-to-3D references: characters, creatures, buildings, ships, cars, weapons, props, pickups, terrain modules.
- Texture and material references: terrain, road, rock, sand, metal, sci-fi panels, trim sheets, decals, hazard labels, signs.
- Environment plates: skies, backdrops, city horizons, nebulas, menu backgrounds, parallax layers.
- UI art: logos, faction marks, icons, item cards, ability badges, cockpit decals, GUI panels, title art.
- Editing an existing image: style variants, cleanup, palette alignment, concept refinement.

For premium graphics work with generation in scope, generate the high-value 2D surfaces rather than defaulting to hand-coded CSS and flat colors. Respect explicitly procedural art and external-service restrictions. Choose assets from the game's design, not a fixed quota of logos, skies, or icons.

## API key

The script reads `--api-key` or `GEMINI_API_KEY`. Keys never go in skill files, game code, or reports.

```bash
uv run <this-skill-dir>/scripts/generate_image.py probe   # GEMINI_API_KEY=SET|MISSING
```

Keys defined only in a shell profile can be absent from the process env. If the plain probe unexpectedly prints MISSING, use `threejs-game-director/scripts/probe_asset_credentials.sh`, which sources the profile and probes all three providers.

## Commands

Run from the game project so output lands in it:

```bash
uv run <this-skill-dir>/scripts/generate_image.py \
  --prompt "your image description" --filename assets/concepts/output.png --resolution 2K

The rest: https://github.com/majidmanzarpour/threejs-game-skills/blob/HEAD/skills/threejs-image-generator/SKILL.md
