threejs-errors-rendering

threejs-errors-rendering is a skill for Claude Code, Codex from Impertio-Studio/Three.js-Claude-Skill-Package. It costs 104 tokens per session (3,045 once invoked), scanned A, original, MIT.

A troubleshooting guide for Three.js scenes that render incorrectly, such as showing a black screen, invisible objects, wrong colors, depth conflicts, or broken shadows. Three.js is a JavaScript library for displaying 3D graphics.

In plain words
What is it for?
Use it to investigate browser-console warnings, camera and renderer setup, lights, materials, object visibility, color spaces, and shadow problems.
Why use it?
Rendering failures can come from canvas size, camera setup, lighting, materials, visibility settings, or color handling. The guide provides checks for finding these causes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/impertio-studio/three.js-claude-skill-package/threejs-errors-rendering
Any agent
npx skills add Impertio-Studio/Three.js-Claude-Skill-Package --skill threejs-errors-rendering
Clone the repo
git clone --depth 1 https://github.com/Impertio-Studio/Three.js-Claude-Skill-Package

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threejs-errors-rendering

README.md
[![agentmods](https://agentmods.dev/badge/skills/impertio-studio/three.js-claude-skill-package/threejs-errors-rendering.svg)](https://agentmods.dev/skills/impertio-studio/three.js-claude-skill-package/threejs-errors-rendering)
Your own site
<a href="https://agentmods.dev/skills/impertio-studio/three.js-claude-skill-package/threejs-errors-rendering"><img src="https://agentmods.dev/badge/skills/impertio-studio/three.js-claude-skill-package/threejs-errors-rendering.svg" alt="Measured on agentmods" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,045 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00104 $0.03045
Opus 5 $0.00052 $0.01522
Sonnet 5 $0.00021 $0.00609
Haiku 4.5 $0.00010 $0.00304

Measured 4d ago against content hash 30eeb2b20f3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

threejs-errors-rendering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/source/threejs-errors/threejs-errors-rendering/SKILL.md · 409 lines

How it starts

The opening of the file, as written. The whole thing — 409 lines — stays where its author put it; the contents beside it link to each section on GitHub.

threejs-errors-rendering

Debugging Workflow Checklist

When a Three.js scene does not render correctly, ALWAYS follow this sequence:

  1. Open the browser console -- check for WebGL errors or Three.js warnings
  2. Verify the renderer has a non-zero size (renderer.getSize(new THREE.Vector2()))
  3. Confirm the canvas is in the DOM and visible (not display: none)
  4. Check that renderer.render(scene, camera) is called (in a loop or at least once)
  5. Verify the camera is looking at the scene (position, target, near/far)
  6. Confirm at least one light exists for lit materials
  7. Check material side, visible, opacity, and transparent properties
  8. Verify object visible, layers, and frustumCulled properties
  9. Inspect color space settings on renderer and textures

Symptom 1: Black Screen (Nothing Visible)

Cause A: Renderer has zero size

The canvas has 0x0 dimensions. This happens when setSize() is called before the container is in the DOM or when the container has no CSS dimensions.

Fix:

// ALWAYS ensure the container is in the DOM and has dimensions before setSize
document.body.appendChild(renderer.domElement);
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));

Cause B: Camera is inside the object or facing away

The camera is at (0, 0, 0) and the object is also at (0, 0, 0), so the camera is inside the mesh. Or the camera is pointing in the wrong direction.

Fix:

camera.position.set(0, 2, 5); // ALWAYS move camera away from origin
camera.lookAt(0, 0, 0);

Cause C: Near/far clipping planes exclude the object

Objects closer than near or farther than far are clipped. Default PerspectiveCamera near is 0.1, far is 2000.

Fix:

const camera = new THREE.PerspectiveCamera(75, aspect, 0.1, 1000);
// NEVER set near to 0 -- causes z-fighting and depth buffer issues
// ALWAYS keep far/near ratio below 100000 for stable depth precision

Read the full file on GitHub · 409 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 409 lines · 104 tokens per session scan A 30eeb2b20f3f

Subscribe to this mod's changes

threejs-errors-rendering is a skill published in the GitHub repository Impertio-Studio/Three.js-Claude-Skill-Package (11 stars, last pushed 1mo ago), licensed MIT. It adds 104 tokens to every session and 3,045 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.