RepoPilot

mrdoob / three.js

Search mrdoob/three.js

GitHub

Code

Understand mrdoob/three.js's source layout and find a starting point for your task using the saved repository evidence.

A
Architecture grade
score 96/100
0
Import cycles
lower is better
400
Modules parsed
1889 edges
94%
Layeredness
clean-layer ratio

Measured from the parsed import graph. Coupling, not a reading order.

Module map

Shaded by how many modules use each one
Entry points and orchestratorsShared coreFoundationStandalonemath29 filesconstants1 filecore18 filesutils1 filetextures17 filesmaterials39 filesgeometries22 filesobjects14 filescameras6 filesscenes3 filesrenderers290 filesnodes219 filesextras25 filesanimation14 fileslights14 filesloaders19 filesaudio5 fileshelpers13 filesThree1 fileThree.Core1 fileThree.Legacy1 fileThree.TSL1 fileThree.WebGPU1 fileThree.WebGPU.Nodes1 file

24 modules, 83 links. A link means one module imports another; thicker lines mean more imports. Links come from 400 parsed files of 1,461 source files, so counts are a sample. Select a module to trace it: blue lines go to what it uses, orange lines come from what uses it.

math29142Shared core
constants1130Foundation
core18114Shared core
utils1111Shared core
textures1764Shared core
materials3945Orchestrator
geometries2232Shared core
objects1436Orchestrator
cameras633Shared core
scenes332Shared core
renderers290211Orchestrator
nodes21926Orchestrator
extras2522Shared core
animation1423Orchestrator
lights1423Orchestrator
loaders19113Orchestrator
audio510Foundation
helpers1300Standalone
Three100Standalone
Three.Core1016Entry or leaf
Three.Legacy100Standalone
Three.TSL100Standalone
Three.WebGPU100Standalone
Three.WebGPU.Nodes100Standalone

Where to start reading

  1. Repository root
  2. Repository root
  3. Suggested starting pointAI
  4. Suggested starting pointAI
  5. Suggested starting pointAI
  6. Suggested starting pointAI
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a New Geometry Primitive

  • Export class and re-export from src/Three.js main module

Add a Custom Material

  • Export and add to src/Three.js or examples/jsm for addon delivery

Add a New Loader

  • Dispatch progress and error events via EventDispatcher; export from src/Three.js

Add a New Light Type

  • Register shader uniforms and update WebGLRenderer light-handling code
  • Export from src/Three.js main bundle

Add or update tests

  • File-name match for this task.
  • File-name match for this task.
  • File-name match for this task.

Change build or automation

  • File-name match for this task.
  • File-name match for this task.
  • File-name match for this task.

File paths come from a snapshot of up to 500 captured paths; an omitted file may still exist.

  • No public or runtime entry point can be identified from the captured paths.
  • Some manifest entry targets are generated output or are absent from the captured source paths. Their source implementation has not been established.

Code quality and hotspots

Code sample: the 15 largest source files

Branch points
175 per file on average
Code issues
0 errors, 36 warnings
Tests
present · 0.23 test files per source file
Largest file
4,268 lines
Hotspot load
10 high-risk files

Configuration status

CI/CD Pipeline — configured

Provider: GitHub Actions

6 GitHub Actions workflows

Test Suite — detected

335 test files detected

Where: examples/models/svg/tests · examples/models/svg/tests/testDefs · test/benchmarks/proxy-node-material

Test files: 0.23 test files per source fileheuristic

335 test files / 1,461 source files. This is a file-count ratio, not real line coverage — set up Codecov for authoritative numbers.

Dependency Scanning — 1 tool configured

CodeQL

Live Signals

Real-time data from Codecov, GitHub Actions, GitHub Issues, deps.dev — not estimates.

CI pass rate94%

last 50 runs · median 1m

Stale-issue ratio0%

of 4 recent open issues are 30d+ old with no replies

Maintainer response3m

median first-reply across 15 recent issues · fast

Top hotspots

Files edited often AND hard to reason about. Churn = recent commit frequency, Complexity = branches and nesting, Risk = both combined. These are the highest-leverage targets for refactoring or testing.

common/Renderer.js
Churn: 100 (55 commits/180d)Complexity: 100Risk: 100
core/NodeBuilder.js
Churn: 100 (31 commits/180d)Complexity: 100Risk: 100

All hotspots

Files that change often and are complex tend to accumulate more bugs

Code metrics

Static analysis on sampled source files (up to 15 files).

Avg Cyclomatic Complexity175

Counts if/for/while/switch/catch/ternary branches

Errors / Warnings0 / 36

Secrets, empty catches, console.log, var usage, long lines

Largest File Analyzed4268 lines
src/renderers/common/Renderer.js