Image to Three.js Model
img2threejs/img2threejs
Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.
A skill your agent uses when drawing shapes and graphics in Phaser 4.
$ npx skills add autonomous-ai/openharness --skill graphics-and-shapes -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install autonomous-ai/openharness graphics-and-shapes --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/store/agents/phaser/skills/graphics-and-shapes .claude/skills/graphics-and-shapes && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "graphics-and-shapes" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/graphics-and-shapes into .claude/skills/graphics-and-shapes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "graphics-and-shapes", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/graphics-and-shapesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add autonomous-ai/openharness --skill graphics-and-shapes -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install autonomous-ai/openharness graphics-and-shapes --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .agents/skills && cp -r skills-src/store/agents/phaser/skills/graphics-and-shapes .agents/skills/graphics-and-shapes && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "graphics-and-shapes" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/graphics-and-shapes into .agents/skills/graphics-and-shapes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "graphics-and-shapes", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add autonomous-ai/openharness --skill graphics-and-shapes -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install autonomous-ai/openharness graphics-and-shapes --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/store/agents/phaser/skills/graphics-and-shapes .cursor/skills/graphics-and-shapes && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "graphics-and-shapes" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/graphics-and-shapes into .cursor/skills/graphics-and-shapes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "graphics-and-shapes", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/autonomous-ai/openharness.git --path store/agents/phaser/skills/graphics-and-shapes--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add autonomous-ai/openharness --skill graphics-and-shapes -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install autonomous-ai/openharness graphics-and-shapes --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/store/agents/phaser/skills/graphics-and-shapes .gemini/skills/graphics-and-shapes && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "graphics-and-shapes" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/graphics-and-shapes into .gemini/skills/graphics-and-shapes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "graphics-and-shapes", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install autonomous-ai/openharness graphics-and-shapesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add autonomous-ai/openharness --skill graphics-and-shapes -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .github/skills && cp -r skills-src/store/agents/phaser/skills/graphics-and-shapes .github/skills/graphics-and-shapes && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "graphics-and-shapes" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/graphics-and-shapes into .github/skills/graphics-and-shapes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "graphics-and-shapes", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add autonomous-ai/openharness --skill graphics-and-shapes -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install autonomous-ai/openharness graphics-and-shapes --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/store/agents/phaser/skills/graphics-and-shapes .opencode/skills/graphics-and-shapes && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "graphics-and-shapes" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/graphics-and-shapes into .opencode/skills/graphics-and-shapes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "graphics-and-shapes", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
graphics-and-shapesA skill your agent uses when drawing shapes and graphics in Phaser 4.
Graphics And Shapes is an agent skill from autonomous-ai/openharness. Use this skill when drawing shapes and graphics in Phaser 4. Covers the Graphics game object, lines, rectangles, circles, arcs, polygons, gradients, fill, stroke, and generated textures. Triggers on: Graphics, draw shape, fillRect, lineStyle, polygon, arc.
Its SKILL.md is about 4.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Game Development. The repository describes itself as: The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across… The licence is MIT.
12 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit cc4983e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Graphics And Shapes loads about 4.9k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 1,359 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from autonomous-ai/openharness at commit cc4983e, republished under its MIT licence (© autonomous-ai). 1,359 words, ~4,944 tokens.
.claude/skills/graphics-and-shapes/SKILL.md (or your agent's skills folder).Drawing primitives with the Graphics game object, and using Shape game objects (Arc, Curve, Ellipse, Grid, IsoBox, IsoTriangle, Line, Polygon, Rectangle, Star, Triangle).
Related skills: sprites-and-images.md, game-object-components.md
// Draw a filled rectangle and stroked circle with Graphics
const gfx = this.add.graphics();
gfx.fillStyle(0x00aa00, 1);
gfx.fillRect(50, 50, 200, 100);
gfx.lineStyle(3, 0xff0000, 1);
gfx.strokeCircle(400, 150, 60);// Same shapes as standalone Shape game objects
const rect = this.add.rectangle(150, 100, 200, 100, 0x00aa00);
const circle = this.add.circle(400, 150, 60);
circle.setStrokeStyle(3, 0xff0000);Phaser offers two approaches for rendering primitives without textures.
Created with this.add.graphics(). An imperative drawing surface — you call methods like fillRect, strokeCircle, beginPath/lineTo/strokePath to build up a command buffer that replays each frame.
this.add.graphics(config?) where config is { x?, y?, lineStyle?, fillStyle? }.translateCanvas, scaleCanvas, rotateCanvas), and save/restore.generateTexture(key, width, height).setPosition).Individual game objects (Arc, Rectangle, Star, etc.) extending the base Shape class. Each renders one predefined geometric shape with precomputed path data.
this.add.rectangle(...), this.add.circle(...), etc.setFillStyle(color, alpha) and setStrokeStyle(lineWidth, color, alpha).When to use which:
const gfx = this.add.graphics();
// Solid fill — call before any fill* method
gfx.fillStyle(0xff0000, 1); // (color, alpha)
// Line style — call before any stroke* method
gfx.lineStyle(4, 0x00ff00, 1); // (width, color, alpha)
// Gradient fill (WebGL only) — 4 corner colors
gfx.fillGradientStyle(
0xff0000, 0x00ff00, 0x0000ff, 0xffff00, // tl, tr, bl, br colors
1, 1, 1, 1 // tl, tr, bl, br alphas
);
gfx.fillRect(0, 0, 300, 200);
// Gradient line style (WebGL only)
gfx.lineGradientStyle(2, 0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 1);const gfx = this.add.graphics();
// Rectangles
gfx.fillStyle(0x0000ff);
gfx.fillRect(x, y, width, height);
gfx.lineStyle(2, 0xffffff);
gfx.strokeRect(x, y, width, height);
// Circles
gfx.fillCircle(x, y, radius);
gfx.strokeCircle(x, y, radius);
// Ellipses
gfx.fillEllipse(x, y, width, height, smoothness);
gfx.strokeEllipse(x, y, width, height, smoothness); // smoothness defaults to 32
// Triangles
gfx.fillTriangle(x0, y0, x1, y1, x2, y2);
gfx.strokeTriangle(x0, y0, x1, y1, x2, y2);
// Points (draws a small square)
gfx.fillPoint(x, y, size); // size defaults to 1
// Lines
gfx.lineBetween(x1, y1, x2, y2);const gfx = this.add.graphics();
// Uniform radius (default 20)
gfx.fillStyle(0x333333);
gfx.fillRoundedRect(50, 50, 300, 200, 16);
gfx.lineStyle(2, 0xffffff);
gfx.strokeRoundedRect(50, 50, 300, 200, 16);
// Per-corner radius
gfx.fillRoundedRect(50, 50, 300, 200, {
tl: 20, tr: 20, bl: 0, br: 0
});
// Concave corners (negative values)
gfx.fillRoundedRect(50, 50, 300, 200, { tl: -10, tr: -10, bl: -10, br: -10 });const gfx = this.add.graphics();
// Manual path
gfx.lineStyle(3, 0xffff00);
gfx.beginPath();
gfx.moveTo(100, 100);
gfx.lineTo(200, 50);
gfx.lineTo(300, 100);
gfx.lineTo(250, 200);
gfx.closePath();
gfx.strokePath(); // or gfx.stroke() — alias for strokePath
// Fill a path
gfx.fillStyle(0x00aaff);
gfx.beginPath();
gfx.moveTo(100, 100);
gfx.lineTo(200, 50);
gfx.lineTo(300, 100);
gfx.closePath();
gfx.fillPath(); // or gfx.fill() — alias for fillPath
// Arc within a path (angles in radians)
gfx.beginPath();
gfx.arc(200, 200, 80, 0, Math.PI / 2, false, 0); // (x, y, radius, startAngle, endAngle, anticlockwise, overshoot)
gfx.strokePath();
// Pie slice
gfx.slice(200, 200, 80, 0, Math.PI / 3, false); // auto begins/closes path
gfx.fillPath();
// Stroke/fill from point arrays
gfx.strokePoints(points, closeShape, closePath, endIndex);
gfx.fillPoints(points, closeShape, closePath, endIndex);Graphics has convenience methods that accept Phaser.Geom objects directly:
const circle = new Phaser.Geom.Circle(200, 200, 50);
const rect = new Phaser.Geom.Rectangle(50, 50, 100, 80);
gfx.fillCircleShape(circle);
gfx.strokeCircleShape(circle);
gfx.fillRectShape(rect);
gfx.strokeRectShape(rect);
gfx.fillTriangleShape(triangle);
gfx.strokeTriangleShape(triangle);
gfx.strokeLineShape(line);
gfx.fillEllipseShape(ellipse, smoothness);
gfx.strokeEllipseShape(ellipse, smoothness);const gfx = this.add.graphics();
gfx.save();
gfx.translateCanvas(100, 100);
gfx.rotateCanvas(0.5); // radians
gfx.scaleCanvas(2, 2);
gfx.fillStyle(0xff0000);
gfx.fillRect(0, 0, 50, 50); // draws at translated/rotated/scaled position
gfx.restore();const gfx = this.add.graphics();
gfx.fillStyle(0xff0000);
gfx.fillCircle(32, 32, 32);
gfx.generateTexture('redCircle', 64, 64);
gfx.destroy();
// Now use as a regular texture
this.add.image(400, 300, 'redCircle');Note: fillGradientStyle will NOT appear in generated textures (Canvas API limitation).
// Shapes set fill via constructor or setFillStyle
const rect = this.add.rectangle(200, 150, 100, 80, 0xff0000, 1);
// Change fill later
rect.setFillStyle(0x00ff00, 0.8);
// Add stroke (not set by default)
rect.setStrokeStyle(3, 0xffffff, 1); // (lineWidth, color, alpha)
// Remove fill or stroke
rect.setFillStyle(); // no args = isFilled becomes false
rect.setStrokeStyle(); // no args = isStroked becomes false
// Direct property access
rect.fillColor = 0x0000ff;
rect.fillAlpha = 0.5;
rect.strokeColor = 0xffffff;
rect.strokeAlpha = 1;
rect.lineWidth = 2;
rect.isFilled = true;
rect.isStroked = true;
rect.closePath = true; // close stroke path (default true)| Factory Method | Class | Parameters (after x, y) | Fill | Stroke | Notes |
|---|---|---|---|---|---|
this.add.arc(x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha) | Arc | radius=128, startAngle=0, endAngle=360 (degrees), anticlockwise=false | Yes | Yes | Angles in degrees. Full circle by default. |
this.add.circle(x, y, radius, fillColor, fillAlpha) | Arc | radius=128 | Yes | Yes | Alias for Arc with 0-360 angles. |
this.add.curve(x, y, curve, fillColor, fillAlpha) | Curve | Phaser.Curves.Curve object | Yes | Yes | Has smoothness property / setSmoothness(). |
this.add.ellipse(x, y, width, height, fillColor, fillAlpha) | Ellipse | width=128, height=128 | Yes | Yes | Equal w/h renders as circle. Has smoothness. |
this.add.grid(x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha) | Grid | width=128, height=128, cellWidth=32, cellHeight=32 | Yes | No | Has altFillColor/altFillAlpha for checkerboard. Outline via outlineFillColor. |
this.add.isobox(x, y, size, height, fillTop, fillLeft, fillRight) | IsoBox | size=48, height=32, fillTop=0xeeeeee, fillLeft=0x999999, fillRight=0xcccccc | Yes | No | Isometric box. showTop, showLeft, showRight, projection. |
this.add.isotriangle(x, y, size, height, reversed, fillTop, fillLeft, fillRight) | IsoTriangle | size=48, height=32, reversed=false | Yes | No | Isometric pyramid. showTop, showLeft, showRight, projection, reversed. |
this.add.line(x, y, x1, y1, x2, y2, strokeColor, strokeAlpha) | Line | x1=0, y1=0, x2=128, y2=0 | No | Yes | Stroke only. Constructor takes stroke color (not fill). |
this.add.polygon(x, y, points, fillColor, fillAlpha) | Polygon | points (various formats) | Yes | Yes | Points: array of Vec2, [x,y,...] pairs, or [[x,y],...]. |
this.add.rectangle(x, y, width, height, fillColor, fillAlpha) | Rectangle | width=128, height=128 | Yes | Yes | Change size via width/height properties. |
this.add.star(x, y, points, innerRadius, outerRadius, fillColor, fillAlpha) | Star | points=5, innerRadius=32, outerRadius=64 | Yes | Yes | 4 points = diamond. More points = spikier. |
this.add.triangle(x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha) | Triangle | x1=0,y1=128, x2=64,y2=0, x3=128,y3=128 | Yes | Yes | Always closed. Use Polygon for open shapes. |
| Method | Signature | Notes |
|---|---|---|
fillStyle | (color, alpha=1) | Set fill for subsequent fill calls |
lineStyle | (lineWidth, color, alpha=1) | Set stroke for subsequent stroke calls |
fillGradientStyle | (tl, tr, bl, br, aTL=1, aTR, aBL, aBR) | WebGL only. 4 corner colors. |
lineGradientStyle | (lineWidth, tl, tr, bl, br, alpha=1) | WebGL only. |
setDefaultStyles | (options) | Set via { lineStyle: {width,color,alpha}, fillStyle: {color,alpha} } |
| Method | Signature | Notes |
|---|---|---|
beginPath | () | Start a new path |
moveTo | (x, y) | Move draw position |
lineTo | (x, y) | Line to position |
arc | (x, y, radius, startAngle, endAngle, anticlockwise=false, overshoot=0) | Angles in radians |
closePath | () | Close current path |
fillPath / fill | () | Fill the current path |
strokePath / stroke | () | Stroke the current path |
slice | (x, y, radius, startAngle, endAngle, anticlockwise=false, overshoot=0) | Pie slice. Auto begins/closes path. Angles in radians. |
| Method | Signature |
|---|---|
fillRect | (x, y, width, height) |
strokeRect | (x, y, width, height) |
fillRoundedRect | (x, y, width, height, radius=20) |
strokeRoundedRect | (x, y, width, height, radius=20) |
fillCircle | (x, y, radius) |
strokeCircle | (x, y, radius) |
fillEllipse | (x, y, width, height, smoothness=32) |
strokeEllipse | (x, y, width, height, smoothness=32) |
fillTriangle | (x0, y0, x1, y1, x2, y2) |
strokeTriangle | (x0, y0, x1, y1, x2, y2) |
fillPoint | (x, y, size=1) |
lineBetween | (x1, y1, x2, y2) |
strokePoints | (points, closeShape=false, closePath=false, endIndex) |
fillPoints | (points, closeShape=false, closePath=false, endIndex) |
| Method | Signature |
|---|---|
fillRectShape | (rect) |
strokeRectShape | (rect) |
fillCircleShape | (circle) |
strokeCircleShape | (circle) |
fillTriangleShape | (triangle) |
strokeTriangleShape | (triangle) |
strokeLineShape | (line) |
fillEllipseShape | (ellipse, smoothness=32) |
strokeEllipseShape | (ellipse, smoothness=32) |
| Method | Signature | Notes |
|---|---|---|
translateCanvas | (x, y) | Translate subsequent draws |
scaleCanvas | (x, y) | Scale subsequent draws |
rotateCanvas | (radians) | Rotate subsequent draws |
save | () | Push state to stack |
restore | () | Pop state from stack |
clear | () | Clear command buffer, reset to default styles |
generateTexture | (key, width, height) | Bake to a Texture (Canvas API) |
| Method | Signature | Notes |
|---|---|---|
setFillStyle | (color?, alpha=1) | No args = disable fill |
setStrokeStyle | (lineWidth?, color?, alpha=1) | No args = disable stroke |
Graphics arc() uses radians; Shape arc factory uses degrees. The Graphics arc method takes start/end angles in radians. The this.add.arc() factory takes them in degrees (0-360). Mixing these up is the most common bug.
Set style BEFORE drawing. fillStyle and lineStyle must be called before the corresponding fill/stroke method. They are not retroactive.
Graphics has no Origin or GetBounds. Unlike Shape objects, Graphics does not include the Origin or GetBounds components. Use setPosition(x, y) and displayOriginX/displayOriginY instead.
Shape isFilled/isStroked defaults. Shapes created with a fillColor parameter have isFilled = true. But isStroked defaults to false — you must call setStrokeStyle() explicitly.
Line shape is stroke-only. The Line shape does not support fill. Its constructor takes strokeColor/strokeAlpha (not fillColor).
IsoBox/IsoTriangle are fill-only. These shapes cannot be stroked. Grid supports outline strokes via its constructor parameters (outlineFillColor, outlineFillAlpha).
generateTexture uses Canvas API. Gradient fills (fillGradientStyle) will not appear in textures generated with generateTexture. Only Canvas-compatible features are captured.
Performance: Graphics is expensive. Each frame the command buffer is replayed and geometry is rebuilt (WebGL decomposes to polygons). For static shapes, call generateTexture and use the resulting texture as a Sprite. Group Graphics objects together to minimize batch breaks.
pathDetailThreshold (v4 new). Graphics has a pathDetailThreshold property (default -1, uses config render.pathDetailThreshold). Path segments below this pixel threshold are combined, improving WebGL performance on complex shapes. Evaluated in screen pixels, so detail emerges when zoomed in.
Rounded rect radius can be an object or number. Pass { tl, tr, bl, br } for per-corner control. Negative values create concave corners. Default is 20 when omitted.
Shape closePath property. The closePath property on Shape objects (default true) controls whether the stroke path is automatically closed. Set to false for open stroked shapes.
Shape objects do NOT support tint methods. Unlike Sprites and Images, Shape game objects do not have setTint() or tint properties. Use setFillStyle(color, alpha) and setStrokeStyle(lineWidth, color, alpha) instead.
Polygon getBounds() incorrect with negative points. If any polygon points have negative coordinates, getBounds() returns wrong values. Use Phaser.Geom.Polygon.GetAABB(polygon.geom) instead and adjust the returned Rectangle position.
const star = this.add.star(400, 300, 5, 32, 64, 0xffff00);
star.setPoints(8); // change number of points
star.setInnerRadius(20); // change inner radius
star.setOuterRadius(80); // change outer radiusconst line = this.add.line(400, 300, 0, 0, 200, 100, 0xffffff);
// setLineWidth(startWidth, endWidth) — endWidth is WebGL only (tapering effect)
line.setLineWidth(4, 1); // tapers from 4px to 1px (Canvas uses startWidth only)const grid = this.add.grid(400, 300, 320, 240, 32, 32, 0x222222);
// Alternating cell color (checkerboard)
grid.setAltFillStyle(0x444444, 1); // no args = disable alternating cells
// Grid uses setStrokeStyle for cell outlines (inherited from Shape)
grid.setStrokeStyle(1, 0x666666, 1);
// v4: control outside edge stroke
grid.strokeOutside = true; // stroke the outer border
grid.strokeOutsideIncomplete = false; // skip partial cells on right/bottom edges
// Cell padding (default 0.5) — gutter between cells is 2x this value
grid.cellPadding = 1;const box = this.add.isobox(200, 200, 48, 32, 0xeeeeee, 0x999999, 0xcccccc);
box.setFaces(true, true, false); // showTop, showLeft, showRight
box.setProjection(4); // isometric projection value
const tri = this.add.isotriangle(400, 200, 48, 32, false, 0xeeeeee, 0x999999, 0xcccccc);
tri.setReversed(true); // flip upside down
tri.setFaces(true, true, true);
tri.setProjection(4);| File | Purpose |
|---|---|
src/gameobjects/graphics/Graphics.js | Graphics class — all drawing methods |
src/gameobjects/graphics/GraphicsFactory.js | this.add.graphics() factory |
src/gameobjects/graphics/Commands.js | Internal command constants for the command buffer |
src/gameobjects/graphics/GraphicsRender.js | Render dispatch |
src/gameobjects/shape/Shape.js | Base Shape class (fill/stroke/path data, setFillStyle, setStrokeStyle) |
src/gameobjects/shape/arc/Arc.js | Arc shape (also used for circle) |
src/gameobjects/shape/arc/ArcFactory.js | this.add.arc() and this.add.circle() factories |
src/gameobjects/shape/curve/Curve.js | Curve shape |
src/gameobjects/shape/curve/CurveFactory.js | this.add.curve() factory |
src/gameobjects/shape/ellipse/Ellipse.js | Ellipse shape |
src/gameobjects/shape/ellipse/EllipseFactory.js | this.add.ellipse() factory |
src/gameobjects/shape/grid/Grid.js | Grid shape |
src/gameobjects/shape/grid/GridFactory.js | this.add.grid() factory |
src/gameobjects/shape/isobox/IsoBox.js | IsoBox shape |
src/gameobjects/shape/isobox/IsoBoxFactory.js | this.add.isobox() factory |
src/gameobjects/shape/isotriangle/IsoTriangle.js | IsoTriangle shape |
src/gameobjects/shape/isotriangle/IsoTriangleFactory.js | this.add.isotriangle() factory |
src/gameobjects/shape/line/Line.js | Line shape |
src/gameobjects/shape/line/LineFactory.js | this.add.line() factory |
src/gameobjects/shape/polygon/Polygon.js | Polygon shape |
src/gameobjects/shape/polygon/PolygonFactory.js | this.add.polygon() factory |
src/gameobjects/shape/rectangle/Rectangle.js | Rectangle shape |
src/gameobjects/shape/rectangle/RectangleFactory.js | this.add.rectangle() factory |
src/gameobjects/shape/star/Star.js | Star shape |
src/gameobjects/shape/star/StarFactory.js | this.add.star() factory |
src/gameobjects/shape/triangle/Triangle.js | Triangle shape |
src/gameobjects/shape/triangle/TriangleFactory.js | this.add.triangle() factory |
© autonomous-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in store/agents/phaser/skills/graphics-and-shapes of autonomous-ai/openharness.
Open the folder on GitHubat commit cc4983e
Graphics And Shapes next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Graphics And Shapes this skillautonomous-ai/openharness | 1.2k | — | ~4.9k | Automated safety check: Pass | MIT | |
| Image to Three.js Modelimg2threejs/img2threejs | 18k | 1 repos | ~8.2k | Automated safety check: Pass | Apache-2.0 | |
| Web CloneJane-xiaoer/claude-skill-web-clone | 1k | 1 repos | ~2.7k | Automated safety check: Pass | MIT | |
| Threejs Game Directormajidmanzarpour/threejs-game-skills | 2.5k | — | ~2.2k | Automated safety check: Pass | MIT | |
| Game Asset Generatorhtdt/godogen | 7.1k | — | ~2.8k | Automated safety check: Pass | MIT | |
| Threejs Gameplay Systemsvalkor-ai/loom | 1.2k | 1 repos | ~1.4k | Automated safety check: Pass | Apache-2.0 |
img2threejs/img2threejs
Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.
Jane-xiaoer/claude-skill-web-clone
网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…
majidmanzarpour/threejs-game-skills
Entrypoint for building, upgrading, and finishing Three.js browser games.
htdt/godogen
Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.
valkor-ai/loom
Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…
CyberAgentGameEntertainment/NovaShader
Execute C with Unity APIs when existing uloop tools cannot inspect or edit enough.
autonomous-ai/openharness
Slices 3D mesh files into printer-profiled plain G-code through real slicer CLIs, with backend discovery, input inspection, dry runs and static validation.
autonomous-ai/openharness
Turns a home-automation request into standard, testable automations.yaml, run against Home Assistant Core's real triggers and verified with its own trace tool.
autonomous-ai/openharness
Turns a musical brief into LilyPond concert-pitch music, checked parts for each instrument and a playable practice pack.
autonomous-ai/openharness
Turns an STL and explicit printer and material requirements into compared OrcaSlicer plans, an editable 3MF project, checked G-code and a portable handoff.
autonomous-ai/openharness
Builds an editable DOCX report, a formula-driven XLSX workbook and a fresh LibreOffice PDF preview from one structured source file, then checks them together.
autonomous-ai/openharness
Dry-run, upload, and cautiously initiate local Bambu Lab print jobs from validated plain .gcode, using Bambu LAN FTPS/MQTT handoffs.
Categories
A skill your agent uses when drawing shapes and graphics in Phaser 4. Graphics And Shapes is an agent skill from autonomous-ai/openharness. Use this skill when drawing shapes and graphics in Phaser 4.
Graphics And Shapes fits situations like: drawing shapes and graphics in Phaser 4.
Run `npx skills add autonomous-ai/openharness --skill graphics-and-shapes -a claude-code`. Or copy the skill folder (store/agents/phaser/skills/graphics-and-shapes in autonomous-ai/openharness) into .claude/skills/graphics-and-shapes in your project. Claude Code loads it when a task matches its description.
Run `npx skills add autonomous-ai/openharness --skill graphics-and-shapes -a codex`. Or copy the skill folder (store/agents/phaser/skills/graphics-and-shapes in autonomous-ai/openharness) into .agents/skills/graphics-and-shapes in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add autonomous-ai/openharness --skill graphics-and-shapes -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/graphics-and-shapes, .gemini/skills/graphics-and-shapes, .github/skills/graphics-and-shapes and .opencode/skills/graphics-and-shapes in your project.
SKILL.md names no scripts, command-line tools or credentials: Graphics And Shapes is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Graphics And Shapes is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.9k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Graphics And Shapes: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.5k stars) and Game Asset Generator (htdt/godogen, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
autonomous-ai (a GitHub organization) maintains it in autonomous-ai/openharness, which has 1,210 GitHub stars. The repository holds 100 skills in this directory. The repository was last updated on October 10, 2026.
Source: autonomous-ai/openharness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.