Safetensors
GGUF
English
Russian
lfm3
reasoning
test-time-compute
inference-time-scaling
code-generation
llama.cpp
negative-results
conversational
Instructions to use HelioAI/LFM3-1.7B-inference-modules-experiments with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M # Run inference directly in the terminal: llama cli -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M # Run inference directly in the terminal: llama cli -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Use Docker
docker model run hf.co/HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Ollama:
ollama run hf.co/HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
- Unsloth Desktop
- Pi
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Docker Model Runner:
docker model run hf.co/HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
- Lemonade
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Run and chat with the model
lemonade run user.LFM3-1.7B-inference-modules-experiments-Q5_K_M
List all available models
lemonade list
- Hermes Agent
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use HelioAI/LFM3-1.7B-inference-modules-experiments with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "HelioAI/LFM3-1.7B-inference-modules-experiments:Q5_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download research/data/visual/tasks_fresh2_kit.jsonl from HelioAI/LFM3-1.7B-inference-modules-experiments: direct link, hf CLI and curl.
- Browser
- Download file 26 kB
-
https://huggingface.co/HelioAI/LFM3-1.7B-inference-modules-experiments/resolve/main/research/data/visual/tasks_fresh2_kit.jsonl
- Command line
-
hf download hf://HelioAI/LFM3-1.7B-inference-modules-experiments/research/data/visual/tasks_fresh2_kit.jsonl
-
curl -L -o tasks_fresh2_kit.jsonl https://huggingface.co/HelioAI/LFM3-1.7B-inference-modules-experiments/resolve/main/research/data/visual/tasks_fresh2_kit.jsonl
26 kB
| {"id": "fresh2/s1", "task": "visual", "cat": "svg", "kind": "svg", "animated": false, "prompt": "Draw a cartoon hedgehog walking on grass: a brown spiky back made of many small triangles, a light brown face with a black nose and a black eye, small feet, and green grass along the bottom.\n\nDo not write the SVG by hand. Write a Python 3 program that draws it with the svgkit toolkit and prints it:\n from svgkit import *\n s = SVG(width, height, bg='#ffffff') # viewBox 0 0 width height; y grows downwards\nShapes (extra keyword arguments become SVG attributes, e.g. stroke='#333', stroke_width=3, opacity=0.8):\n s.rect(x, y, w, h, fill, rx=None), s.circle(cx, cy, r, fill), s.ellipse(cx, cy, rx, ry, fill, rotate=0),\n s.line(x1, y1, x2, y2, stroke, width), s.polyline(points, stroke, width), s.polygon(points, fill), s.path(d, fill),\n s.text(x, y, 'label', size=16, fill='#222', anchor='middle' | 'start' | 'end', weight='bold')\nGeometry (angles in degrees clockwise from 12 o'clock: 0 = up, 90 = right, 180 = down, 270 = left):\n polar(cx, cy, r, deg) -> (x, y); s.regular_polygon(cx, cy, r, n, rotate=0, fill=...);\n s.star(cx, cy, r_out, r_in, n=5, fill=...); s.slice(cx, cy, r, start_deg, end_deg, r_inner=0, fill=...)\n (pie slice, donut segment when r_inner > 0); s.arc(cx, cy, r, start_deg, end_deg, stroke, width) (open arc: gauges,\n rings, angle marks); s.radial_lines(cx, cy, r1, r2, n, start=0, stroke, width) (n evenly spaced ticks, rays,\n spokes); s.radial_text(cx, cy, r, ['A', 'B', 'C', 'D'], start=0, size=...) (labels evenly around a circle);\n s.smooth(points, closed=False, fill, stroke) (smooth curve through points); s.wave(x0, x1, y, amplitude,\n wavelength, bottom=None, fill) (bottom=y closes it into a filled band); s.arrow(x1, y1, x2, y2, stroke, width,\n head=10); s.connector(x1, y1, x2, y2) (arrow with right-angle bends).\nPaint: fill=s.linear_gradient([(0, '#87ceeb'), (1, '#ffffff')]) (top to bottom; x2=1, y2=0 for left to right),\n s.radial_gradient([...]), filter=s.shadow(), filter=s.glow(8).\nStructure: with s.group(translate=(x, y), rotate=(deg, cx, cy), scale=k): ...; with s.mirror(x): ... (everything\n drawn inside appears again mirrored around the vertical line x); with s.repeat_around(cx, cy, n): ... (what you draw\n pointing up from the centre is repeated n times around it). Later shapes are drawn on top of earlier ones.\nCharts: y = Scale((min_value, max_value), (bottom_px, top_px)); y(v) -> pixel; s.axis_y(y, x, values, x_end=...)\n (tick labels and grid lines), s.axis_x(y_px, x0, x1, labels, positions), s.legend(x, y, [(colour, label), ...]);\n mix(c1, c2, t) blends two colours.\n\nExample (a flower):\nfrom svgkit import *\ns = SVG(400, 400, bg='#eef6ee')\ns.line(200, 210, 200, 380, stroke='#3f7d3a', width=8)\nwith s.repeat_around(200, 170, 8):\n s.ellipse(200, 110, 26, 55, fill='#f472b6')\ns.circle(200, 170, 34, fill='#fbbf24')\nprint(s)\n\nAnswer with the program in a single ```python code block. It must print the finished SVG."} | |
| {"id": "fresh2/s2", "task": "visual", "cat": "svg", "kind": "svg", "animated": false, "prompt": "Draw a weather card: a rounded white card with the city 'Oslo', the temperature '18 °C' in large text, an icon of a sun partly behind a cloud, and three small labelled bars for wind, rain and humidity.\n\nDo not write the SVG by hand. Write a Python 3 program that draws it with the svgkit toolkit and prints it:\n from svgkit import *\n s = SVG(width, height, bg='#ffffff') # viewBox 0 0 width height; y grows downwards\nShapes (extra keyword arguments become SVG attributes, e.g. stroke='#333', stroke_width=3, opacity=0.8):\n s.rect(x, y, w, h, fill, rx=None), s.circle(cx, cy, r, fill), s.ellipse(cx, cy, rx, ry, fill, rotate=0),\n s.line(x1, y1, x2, y2, stroke, width), s.polyline(points, stroke, width), s.polygon(points, fill), s.path(d, fill),\n s.text(x, y, 'label', size=16, fill='#222', anchor='middle' | 'start' | 'end', weight='bold')\nGeometry (angles in degrees clockwise from 12 o'clock: 0 = up, 90 = right, 180 = down, 270 = left):\n polar(cx, cy, r, deg) -> (x, y); s.regular_polygon(cx, cy, r, n, rotate=0, fill=...);\n s.star(cx, cy, r_out, r_in, n=5, fill=...); s.slice(cx, cy, r, start_deg, end_deg, r_inner=0, fill=...)\n (pie slice, donut segment when r_inner > 0); s.arc(cx, cy, r, start_deg, end_deg, stroke, width) (open arc: gauges,\n rings, angle marks); s.radial_lines(cx, cy, r1, r2, n, start=0, stroke, width) (n evenly spaced ticks, rays,\n spokes); s.radial_text(cx, cy, r, ['A', 'B', 'C', 'D'], start=0, size=...) (labels evenly around a circle);\n s.smooth(points, closed=False, fill, stroke) (smooth curve through points); s.wave(x0, x1, y, amplitude,\n wavelength, bottom=None, fill) (bottom=y closes it into a filled band); s.arrow(x1, y1, x2, y2, stroke, width,\n head=10); s.connector(x1, y1, x2, y2) (arrow with right-angle bends).\nPaint: fill=s.linear_gradient([(0, '#87ceeb'), (1, '#ffffff')]) (top to bottom; x2=1, y2=0 for left to right),\n s.radial_gradient([...]), filter=s.shadow(), filter=s.glow(8).\nStructure: with s.group(translate=(x, y), rotate=(deg, cx, cy), scale=k): ...; with s.mirror(x): ... (everything\n drawn inside appears again mirrored around the vertical line x); with s.repeat_around(cx, cy, n): ... (what you draw\n pointing up from the centre is repeated n times around it). Later shapes are drawn on top of earlier ones.\nCharts: y = Scale((min_value, max_value), (bottom_px, top_px)); y(v) -> pixel; s.axis_y(y, x, values, x_end=...)\n (tick labels and grid lines), s.axis_x(y_px, x0, x1, labels, positions), s.legend(x, y, [(colour, label), ...]);\n mix(c1, c2, t) blends two colours.\n\nExample (a flower):\nfrom svgkit import *\ns = SVG(400, 400, bg='#eef6ee')\ns.line(200, 210, 200, 380, stroke='#3f7d3a', width=8)\nwith s.repeat_around(200, 170, 8):\n s.ellipse(200, 110, 26, 55, fill='#f472b6')\ns.circle(200, 170, 34, fill='#fbbf24')\nprint(s)\n\nAnswer with the program in a single ```python code block. It must print the finished SVG."} | |
| {"id": "fresh2/p1", "task": "visual", "cat": "html", "kind": "html", "animated": false, "prompt": "Build a 'Book a table' page for a restaurant called 'Olive & Thyme': a heading, a short welcome text, a reservation form (date, time, number of guests, name, phone, book button) and a side box with opening hours and the address.\n\nUse the ui.css design system: put <link rel=\"stylesheet\" href=\"ui.css\"> in <head> and <script src=\"ui.js\"></script> at the end of <body> (the system inlines both). Write semantic HTML with its classes and add your own <style> only for details the kit does not cover.\nThemes: <body data-theme=\"warm|forest|ocean|dark\"> (default: indigo on light grey).\nLayout: .container (centred, max 1120px), .narrow, .section (vertical padding), .section-alt (tinted band),\n .section-title, .grid (auto-fit columns; style=\"--min:200px\" changes the column width), .grid-2 .grid-3 .grid-4,\n .row (flex row with gap; .between .end .top), .grow, .stack (vertical spacing),\n .layout-sidebar > .sidebar + .main (app layout), .topbar.\nNavigation and hero: .navbar > .container > .brand + .nav-links > a (.active); .hero (centred; h1 + p.lead + buttons),\n .hero.hero-dark.\nContent: .card (.card-hover, .featured), .media + .ph or .ph-1 ... .ph-8 (gradient image placeholders),\n .btn (.btn-outline .btn-ghost .btn-accent .btn-light .btn-danger .btn-lg .btn-sm .btn-block),\n .badge (.badge-primary .badge-success .badge-warning .badge-danger), .tags > .tag, .avatar (initials inside;\n .avatar-sm .avatar-lg), .icon (tile with an emoji or symbol), .price (with <small>/month</small>), .stars,\n .list-check (check-mark list; li.no shows a cross), .kpi > .value + .label (.up .down), .progress > span\n (style=\"width:60%\"), .eyebrow, .lead, .muted, .small, .center.\nForms: .field > label + input / select / textarea + .error; .check (checkbox or radio with its text); toggle switch:\n <label class=\"switch\"><input type=\"checkbox\"><span></span></label>; <input type=\"range\" data-show=\"outId\"> writes\n its value into #outId.\nTables: <table class=\"table\">, .num for right-aligned numbers; <table class=\"table\" data-sortable> with <th data-sort>\n or <th data-sort=\"number\"> sorts on click; wrap in .table-wrap for a sticky header.\nInteractive: tabs <div data-tabs><div class=\"tab-list\"><button>One</button><button>Two</button></div>\n <div class=\"tab-panel\">...</div><div class=\"tab-panel\">...</div></div>;\n accordion <details class=\"accordion\"><summary>Question</summary><p>Answer</p></details>;\n modal <button class=\"btn\" data-open=\"m1\">Open</button> <div class=\"modal\" id=\"m1\"><div class=\"modal-box\">\n <button class=\"close\" data-close>×</button>...</div></div> (Escape also closes);\n UI.toast('Saved', 'success' | 'warning' | 'error').\nAlso: .timeline > .item (alternating sides), .steps > .step (.active .done), .bubble.me / .bubble.them (chat),\n .prose (article text), blockquote, pre / code, figure + figcaption, .footer, .divider.\n\nExample (a card with a badge and two buttons):\n<div class=\"container section\"><div class=\"card\" style=\"max-width:420px\">\n <span class=\"badge badge-primary\">New</span><h3>Trail Backpack</h3><p class=\"muted\">Light, waterproof, 28 litres.</p>\n <div class=\"row between\"><span class=\"price\">$89</span><button class=\"btn\">Buy now</button></div>\n</div></div>\n\nAnswer with one complete HTML file in a single ```html code block. Do not copy the toolkit itself."} | |
| {"id": "fresh2/p2", "task": "visual", "cat": "html", "kind": "html", "animated": false, "prompt": "Build a service status page: a header with the product name and an 'All systems operational' banner, a list of five services each with a green, yellow or red status pill, and an incident history of three past incidents with dates.\n\nUse the ui.css design system: put <link rel=\"stylesheet\" href=\"ui.css\"> in <head> and <script src=\"ui.js\"></script> at the end of <body> (the system inlines both). Write semantic HTML with its classes and add your own <style> only for details the kit does not cover.\nThemes: <body data-theme=\"warm|forest|ocean|dark\"> (default: indigo on light grey).\nLayout: .container (centred, max 1120px), .narrow, .section (vertical padding), .section-alt (tinted band),\n .section-title, .grid (auto-fit columns; style=\"--min:200px\" changes the column width), .grid-2 .grid-3 .grid-4,\n .row (flex row with gap; .between .end .top), .grow, .stack (vertical spacing),\n .layout-sidebar > .sidebar + .main (app layout), .topbar.\nNavigation and hero: .navbar > .container > .brand + .nav-links > a (.active); .hero (centred; h1 + p.lead + buttons),\n .hero.hero-dark.\nContent: .card (.card-hover, .featured), .media + .ph or .ph-1 ... .ph-8 (gradient image placeholders),\n .btn (.btn-outline .btn-ghost .btn-accent .btn-light .btn-danger .btn-lg .btn-sm .btn-block),\n .badge (.badge-primary .badge-success .badge-warning .badge-danger), .tags > .tag, .avatar (initials inside;\n .avatar-sm .avatar-lg), .icon (tile with an emoji or symbol), .price (with <small>/month</small>), .stars,\n .list-check (check-mark list; li.no shows a cross), .kpi > .value + .label (.up .down), .progress > span\n (style=\"width:60%\"), .eyebrow, .lead, .muted, .small, .center.\nForms: .field > label + input / select / textarea + .error; .check (checkbox or radio with its text); toggle switch:\n <label class=\"switch\"><input type=\"checkbox\"><span></span></label>; <input type=\"range\" data-show=\"outId\"> writes\n its value into #outId.\nTables: <table class=\"table\">, .num for right-aligned numbers; <table class=\"table\" data-sortable> with <th data-sort>\n or <th data-sort=\"number\"> sorts on click; wrap in .table-wrap for a sticky header.\nInteractive: tabs <div data-tabs><div class=\"tab-list\"><button>One</button><button>Two</button></div>\n <div class=\"tab-panel\">...</div><div class=\"tab-panel\">...</div></div>;\n accordion <details class=\"accordion\"><summary>Question</summary><p>Answer</p></details>;\n modal <button class=\"btn\" data-open=\"m1\">Open</button> <div class=\"modal\" id=\"m1\"><div class=\"modal-box\">\n <button class=\"close\" data-close>×</button>...</div></div> (Escape also closes);\n UI.toast('Saved', 'success' | 'warning' | 'error').\nAlso: .timeline > .item (alternating sides), .steps > .step (.active .done), .bubble.me / .bubble.them (chat),\n .prose (article text), blockquote, pre / code, figure + figcaption, .footer, .divider.\n\nExample (a card with a badge and two buttons):\n<div class=\"container section\"><div class=\"card\" style=\"max-width:420px\">\n <span class=\"badge badge-primary\">New</span><h3>Trail Backpack</h3><p class=\"muted\">Light, waterproof, 28 litres.</p>\n <div class=\"row between\"><span class=\"price\">$89</span><button class=\"btn\">Buy now</button></div>\n</div></div>\n\nAnswer with one complete HTML file in a single ```html code block. Do not copy the toolkit itself."} | |
| {"id": "fresh2/a1", "task": "visual", "cat": "canvas", "kind": "html", "animated": true, "prompt": "Make a bubble-popping game on a canvas: colourful bubbles float up from the bottom at different speeds; clicking a bubble pops it with a small burst of particles and adds one point to the score shown at the top.\n\nUse the kit2d toolkit. The page already contains it as the global Kit: it creates a full-window canvas and runs the animation loop, so you only write what to draw and how things move.\n const app = Kit.canvas({ background: '#101820', trail: 0 });\n app.ctx (2D context), app.w, app.h (size), app.mouse {x, y, down}, app.keys (Set of pressed key names), app.t\n app.frame((dt, t) => { ...update, then draw... }) every frame (dt, t in seconds); the screen is cleared first\n (trail between 0 and 1 fades the previous frame instead, for motion trails).\n app.onClick((x, y) => ...), app.onKey((key) => ...)\nDrawing (ctx = app.ctx): Kit.circle(ctx, x, y, r, fill, stroke, lineWidth), Kit.ellipse(ctx, x, y, rx, ry, rotation,\n fill), Kit.rect(ctx, x, y, w, h, fill, stroke, lineWidth, radius), Kit.line(ctx, x1, y1, x2, y2, stroke, width),\n Kit.poly(ctx, [[x,y],...], fill, stroke), Kit.arc(ctx, x, y, r, fromDeg, toDeg, stroke, width),\n Kit.text(ctx, 'text', x, y, { size, color, align, baseline, weight }), Kit.glow(ctx, blur, color), Kit.noGlow(ctx).\nMath: Kit.polar(cx, cy, r, deg) -> [x, y] with 0 deg = up, clockwise; Kit.rand(a, b), Kit.randInt(a, b),\n Kit.choice(array), Kit.clamp(v, a, b), Kit.lerp(a, b, t), Kit.dist(x1, y1, x2, y2), Kit.hsl(h, s, l, a),\n Kit.ease.inOut(t) / Kit.ease.out(t).\nCollisions: Kit.circlesHit(a, b) for {x, y, r}; Kit.rectsHit(a, b) for {x, y, w, h}; Kit.circleRectHit(circle, rect).\nParticles: const ps = Kit.particles(); ps.add({ x, y, vx, vy, life, size, color }); ps.update(dt, { gravity, drag,\n wind }); ps.draw(ctx, { additive: true, shrink: true }) (velocities in pixels per second, life in seconds).\nGrid: const g = Kit.grid(cols, rows); g.get(c, r), g.set(c, r, v); g.layout(app) -> { size, x0, y0 } (square cells\n that fit the screen and the top-left corner of the grid).\nOverlays: Kit.hud('Score: 3') (top-left text), Kit.message('Game over', true) / Kit.message('', false),\n Kit.button('Restart', onClick, { top: '20px', right: '20px' }).\n\nExample (a square moving along a curve with a trail; clicks add dots):\n<script>\nconst app = Kit.canvas({ background: '#0f172a', trail: 0.15 });\nconst dots = [];\napp.onClick((x, y) => dots.push({ x, y, r: Kit.rand(6, 14) }));\napp.frame((dt, t) => {\n const x = app.w / 2 + Math.sin(t) * 200, y = app.h / 2 + Math.cos(t * 2) * 80;\n Kit.rect(app.ctx, x - 20, y - 20, 40, 40, Kit.hsl((t * 60) % 360), null, 0, 8);\n for (const d of dots) Kit.circle(app.ctx, d.x, d.y, d.r, '#f8fafc');\n Kit.hud('Dots: ' + dots.length);\n});\n</script>\n\nAnswer with one complete HTML file in a single ```html code block with your code in a <script> at the end of <body>. Do not copy the toolkit itself and do not use other libraries."} | |
| {"id": "fresh2/a2", "task": "visual", "cat": "canvas", "kind": "html", "animated": true, "prompt": "Make an audio equalizer animation on a canvas: 24 vertical bars that rise and fall smoothly to a fake rhythm, each bar coloured from green at the bottom through yellow to red at the top, with small peak markers that fall slowly.\n\nUse the kit2d toolkit. The page already contains it as the global Kit: it creates a full-window canvas and runs the animation loop, so you only write what to draw and how things move.\n const app = Kit.canvas({ background: '#101820', trail: 0 });\n app.ctx (2D context), app.w, app.h (size), app.mouse {x, y, down}, app.keys (Set of pressed key names), app.t\n app.frame((dt, t) => { ...update, then draw... }) every frame (dt, t in seconds); the screen is cleared first\n (trail between 0 and 1 fades the previous frame instead, for motion trails).\n app.onClick((x, y) => ...), app.onKey((key) => ...)\nDrawing (ctx = app.ctx): Kit.circle(ctx, x, y, r, fill, stroke, lineWidth), Kit.ellipse(ctx, x, y, rx, ry, rotation,\n fill), Kit.rect(ctx, x, y, w, h, fill, stroke, lineWidth, radius), Kit.line(ctx, x1, y1, x2, y2, stroke, width),\n Kit.poly(ctx, [[x,y],...], fill, stroke), Kit.arc(ctx, x, y, r, fromDeg, toDeg, stroke, width),\n Kit.text(ctx, 'text', x, y, { size, color, align, baseline, weight }), Kit.glow(ctx, blur, color), Kit.noGlow(ctx).\nMath: Kit.polar(cx, cy, r, deg) -> [x, y] with 0 deg = up, clockwise; Kit.rand(a, b), Kit.randInt(a, b),\n Kit.choice(array), Kit.clamp(v, a, b), Kit.lerp(a, b, t), Kit.dist(x1, y1, x2, y2), Kit.hsl(h, s, l, a),\n Kit.ease.inOut(t) / Kit.ease.out(t).\nCollisions: Kit.circlesHit(a, b) for {x, y, r}; Kit.rectsHit(a, b) for {x, y, w, h}; Kit.circleRectHit(circle, rect).\nParticles: const ps = Kit.particles(); ps.add({ x, y, vx, vy, life, size, color }); ps.update(dt, { gravity, drag,\n wind }); ps.draw(ctx, { additive: true, shrink: true }) (velocities in pixels per second, life in seconds).\nGrid: const g = Kit.grid(cols, rows); g.get(c, r), g.set(c, r, v); g.layout(app) -> { size, x0, y0 } (square cells\n that fit the screen and the top-left corner of the grid).\nOverlays: Kit.hud('Score: 3') (top-left text), Kit.message('Game over', true) / Kit.message('', false),\n Kit.button('Restart', onClick, { top: '20px', right: '20px' }).\n\nExample (a square moving along a curve with a trail; clicks add dots):\n<script>\nconst app = Kit.canvas({ background: '#0f172a', trail: 0.15 });\nconst dots = [];\napp.onClick((x, y) => dots.push({ x, y, r: Kit.rand(6, 14) }));\napp.frame((dt, t) => {\n const x = app.w / 2 + Math.sin(t) * 200, y = app.h / 2 + Math.cos(t * 2) * 80;\n Kit.rect(app.ctx, x - 20, y - 20, 40, 40, Kit.hsl((t * 60) % 360), null, 0, 8);\n for (const d of dots) Kit.circle(app.ctx, d.x, d.y, d.r, '#f8fafc');\n Kit.hud('Dots: ' + dots.length);\n});\n</script>\n\nAnswer with one complete HTML file in a single ```html code block with your code in a <script> at the end of <body>. Do not copy the toolkit itself and do not use other libraries."} | |
| {"id": "fresh2/d1", "task": "visual", "cat": "three", "kind": "html", "animated": true, "prompt": "Make a three.js garden: a wooden bench made of boxes, a round pond (a flat blue cylinder), and five flowers (green stems with coloured petal spheres) on a grass ground, with the camera slowly circling.\n\nUse three.js through this import map: <script type=\"importmap\">{\"imports\": {\"three\": \"https://unpkg.com/three@0.160.0/build/three.module.js\", \"three/addons/\": \"https://unpkg.com/three@0.160.0/examples/jsm/\"}}</script>\n\nUse the kit3d toolkit. The page already contains it: it creates the renderer, camera, lights, shadows, orbit controls and the animation loop, so you only build the scene. Import it in your module script:\n import { setup, box, sphere, cylinder, cone, torus, plane, group, onFrame } from 'kit3d';\n\nAPI (sizes in world units, angles in degrees, colours like 0xff8800 or '#ff8800'; the y axis points up, the ground is the plane y = 0, so an object of height h stands on it at y = h/2):\n setup({ background, camera: [x,y,z], target: [x,y,z], ground: colour|true, groundSize, shadows, fog, autoRotate })\n -> { scene, camera, renderer, controls, THREE }. Call it first. The camera looks at target (default [0,0,0]);\n autoRotate: true makes the camera circle slowly around the target.\n Every shape is added to the scene (or to `parent`) and returned as a three.js mesh:\n box({ size: [w,h,d], color, at: [x,y,z], rot: [rx,ry,rz], parent }), sphere({ r, color, at }),\n cylinder({ r, h, rTop, rBottom, color, at, rot }), cone({ r, h, color, at, rot }), torus({ r, tube, color, at, rot }),\n capsule({ r, h }), ring({ inner, outer }), plane({ size: [w,d], color, at }) (horizontal),\n poly({ kind: 'tetra'|'octa'|'dodeca'|'icosa', r }), extrude({ points: [[x,y],...], depth }) (a flat outline made 3D),\n lathe({ points: [[radius,y],...] }) (a profile turned around the vertical axis), tube({ points: [[x,y,z],...], r }).\n Material options on every shape: metal (0..1), rough (0..1), glow (emissive strength), opacity (0..1), flat, wire.\n group({ at, rot, parent }) -> an empty object for compound things: create parts with parent: g, then move/rotate g.\n points({ positions: [[x,y,z],...], colors: [...], size, glow }) and movePoints(pts, flatArray) for particles;\n stars({ count, radius }); line({ points: [[x,y,z],...], color }); label({ text, at, size, color }) (faces the camera).\n light.point({ color, intensity, at }), light.spot({ color, intensity, at, target, angle }).\n onFrame((t, dt) => { ... }) runs every frame (t = seconds since start): animate by changing mesh.position,\n mesh.rotation (radians), mesh.scale or material properties here.\n\nExample (a red ball bouncing next to a blue box):\n<script type=\"module\">\nimport { setup, box, sphere, onFrame } from 'kit3d';\nsetup({ background: 0xdfe8f5, camera: [5, 4, 8], ground: 0xb8c4a8 });\nbox({ size: [1.5, 1.5, 1.5], color: 0x3b6fd8, at: [-1.5, 0.75, 0], rot: [0, 30, 0] });\nconst ball = sphere({ r: 0.6, color: 0xe0453a, at: [1.2, 0.6, 0] });\nonFrame((t) => { ball.position.y = 0.6 + Math.abs(Math.sin(t * 3)) * 1.5; });\n</script>\n\nAnswer with one complete HTML file in a single ```html code block: the import map from the task in <head>, then <script type=\"module\"> with your scene code that imports from 'kit3d'. Do not copy the toolkit itself."} | |
| {"id": "fresh2/d2", "task": "visual", "cat": "three", "kind": "html", "animated": true, "prompt": "Make a three.js rocket launch: a rocket built from a white cylinder, a red cone nose and three fins standing on a grey launch pad, slowly rising with a flickering orange flame under it and grey smoke particles.\n\nUse three.js through this import map: <script type=\"importmap\">{\"imports\": {\"three\": \"https://unpkg.com/three@0.160.0/build/three.module.js\", \"three/addons/\": \"https://unpkg.com/three@0.160.0/examples/jsm/\"}}</script>\n\nUse the kit3d toolkit. The page already contains it: it creates the renderer, camera, lights, shadows, orbit controls and the animation loop, so you only build the scene. Import it in your module script:\n import { setup, box, sphere, cylinder, cone, torus, plane, group, onFrame } from 'kit3d';\n\nAPI (sizes in world units, angles in degrees, colours like 0xff8800 or '#ff8800'; the y axis points up, the ground is the plane y = 0, so an object of height h stands on it at y = h/2):\n setup({ background, camera: [x,y,z], target: [x,y,z], ground: colour|true, groundSize, shadows, fog, autoRotate })\n -> { scene, camera, renderer, controls, THREE }. Call it first. The camera looks at target (default [0,0,0]);\n autoRotate: true makes the camera circle slowly around the target.\n Every shape is added to the scene (or to `parent`) and returned as a three.js mesh:\n box({ size: [w,h,d], color, at: [x,y,z], rot: [rx,ry,rz], parent }), sphere({ r, color, at }),\n cylinder({ r, h, rTop, rBottom, color, at, rot }), cone({ r, h, color, at, rot }), torus({ r, tube, color, at, rot }),\n capsule({ r, h }), ring({ inner, outer }), plane({ size: [w,d], color, at }) (horizontal),\n poly({ kind: 'tetra'|'octa'|'dodeca'|'icosa', r }), extrude({ points: [[x,y],...], depth }) (a flat outline made 3D),\n lathe({ points: [[radius,y],...] }) (a profile turned around the vertical axis), tube({ points: [[x,y,z],...], r }).\n Material options on every shape: metal (0..1), rough (0..1), glow (emissive strength), opacity (0..1), flat, wire.\n group({ at, rot, parent }) -> an empty object for compound things: create parts with parent: g, then move/rotate g.\n points({ positions: [[x,y,z],...], colors: [...], size, glow }) and movePoints(pts, flatArray) for particles;\n stars({ count, radius }); line({ points: [[x,y,z],...], color }); label({ text, at, size, color }) (faces the camera).\n light.point({ color, intensity, at }), light.spot({ color, intensity, at, target, angle }).\n onFrame((t, dt) => { ... }) runs every frame (t = seconds since start): animate by changing mesh.position,\n mesh.rotation (radians), mesh.scale or material properties here.\n\nExample (a red ball bouncing next to a blue box):\n<script type=\"module\">\nimport { setup, box, sphere, onFrame } from 'kit3d';\nsetup({ background: 0xdfe8f5, camera: [5, 4, 8], ground: 0xb8c4a8 });\nbox({ size: [1.5, 1.5, 1.5], color: 0x3b6fd8, at: [-1.5, 0.75, 0], rot: [0, 30, 0] });\nconst ball = sphere({ r: 0.6, color: 0xe0453a, at: [1.2, 0.6, 0] });\nonFrame((t) => { ball.position.y = 0.6 + Math.abs(Math.sin(t * 3)) * 1.5; });\n</script>\n\nAnswer with one complete HTML file in a single ```html code block: the import map from the task in <head>, then <script type=\"module\"> with your scene code that imports from 'kit3d'. Do not copy the toolkit itself."} | |