Public report of playcanvas/engine, published 29 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 29 October 2026, 23:00 UTC · Survey ID cd_b729c845a91e4c3eab086ec72c04cdca
playcanvas/engine
Measured 29 October 2026, 22:36 UTC, at code version 9323c62
Regression: 1 dimension fell since the last survey
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 3 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 367,840 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 3.1 person-years · Weakest lens: Security and Compliance, 49
Findings by how serious they are
60 critical1124 serious112 minor
10 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
29 October 2026, 22:36 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
68of 68 dimensions measured by tools.
1280of 1296 findings point to an exact file and line, so you can open each one in the code. The other 16 concern the repository as a whole, such as missing documentation.
68dimensions across 6 lenses, read from 367,840 lines of product code in 1 project.
playcanvas/engine falls short of our standard for production, in part because it has passwords or keys in the code's history. It scores 55 out of 100 and is rated Adequate, and 54 of its 60 critical findings are security problems.
Security and Compliance, at 49, is the weakest lens and counts most in the score. The best first step is replacing the six passwords or keys found in the code's history, worth about 4 points. Fixing the runtime or framework that no longer gets security updates comes next, worth about 3 points. Raising Security and Compliance to 70 would lift the score to about 60.
Thirty-two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Ten known security holes in the packages the code depends on can be used by attackers, and seven passwords or keys in the code's history and two in the code are open to anyone who can read the repository. Pinning each tool to an exact version, updating the vulnerable packages and replacing each exposed password or key would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and limiting each secret to its own step would deal with the secret exposed to more of the pipeline than needed. The five sets of files in separate parts that keep changing together need that dependency made explicit.
The product code is 367,840 lines, about €450,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Security and Compliance rose from 49 to 70, the lowest score rated Strong, the score would rise from 55 to about 60.
Code composition: what the lines of code are
Product code 82%Tests 18%
New since the last survey: 181 findings
These 181 critical or serious findings weren't in the previous survey, on 15 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Duplicated block with local edits (87 matched lines × 2 locations) src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js
Code Duplication · Duplicated block with local edits (65 matched lines × 2 locations) src/extras/gizmo/handle/cone-gizmo.js
Code Duplication · Duplicated block with local edits (47 matched lines × 2 locations) src/extras/gizmo/handle/capsule-gizmo.js
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 788 findings
These 788 critical or serious findings were in the previous survey, on 15 October 2026, and are gone from this one. The first 100 are listed here.
€150,000 to €750,000, for 2,486 to 7,888 hours of work, about 3.1 person-years for 1 to 6 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 55. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 367,840 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (6).
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Files that change often carry extra risk · Combined risk
13 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (58 files) · Code Coverage (149 files under half tested) · Bus Factor (0 files written almost entirely by one person) · The files: webgl-graphics-device.js, text-element.js and webgl-texture.js
What to do: Add tests to these files and have a second person review every change to them, starting with webgl-graphics-device.js, text-element.js and webgl-texture.js.
Where the investment is most exposed · Value at risk
This code would cost about €450,000 to build again, about 3.1 person-years of work. Its weakest lens is Security and Compliance, at 49 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 6 REDACTED finding(s) in Secrets (history). Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 6 Secrets (history) findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.3 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 4% to 10% on every change. The history of the code shows how much it changes: about 204,571 lines over the last 90 days, which is about 829,649 lines a year. At that pace, the extra work comes to an estimated 87.7 to 526.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
772 modules, with 336 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 732 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
src.core.ref-counted-key-cache uses src.core.ref-counted-object, so a change to src.core.ref-counted-object can break src.core.ref-counted-key-cache, while a change to src.core.ref-counted-key-cache can't break src.core.ref-counted-object.
Position
Below the diagonal: src.core.ref-counted-key-cache uses a module listed above it, which is the healthy direction.
src.extras.gizmo.gizmo uses src.core.event-handler, so a change to src.core.event-handler can break src.extras.gizmo.gizmo, while a change to src.extras.gizmo.gizmo can't break src.core.event-handler.
Position
Below the diagonal: src.extras.gizmo.gizmo uses a module listed above it, which is the healthy direction.
src.framework.app-base uses src.core.event-handler, so a change to src.core.event-handler can break src.framework.app-base, while a change to src.framework.app-base can't break src.core.event-handler.
Position
Below the diagonal: src.framework.app-base uses a module listed above it, which is the healthy direction.
src.framework.components.component uses src.core.event-handler, so a change to src.core.event-handler can break src.framework.components.component, while a change to src.framework.components.component can't break src.core.event-handler.
Position
Below the diagonal: src.framework.components.component uses a module listed above it, which is the healthy direction.
src.framework.components.system uses src.core.event-handler, so a change to src.core.event-handler can break src.framework.components.system, while a change to src.framework.components.system can't break src.core.event-handler.
Position
Below the diagonal: src.framework.components.system uses a module listed above it, which is the healthy direction.
src.framework.script.script uses src.core.event-handler, so a change to src.core.event-handler can break src.framework.script.script, while a change to src.framework.script.script can't break src.core.event-handler.
Position
Below the diagonal: src.framework.script.script uses a module listed above it, which is the healthy direction.
src.platform.graphics.graphics-device uses src.core.event-handler, so a change to src.core.event-handler can break src.platform.graphics.graphics-device, while a change to src.platform.graphics.graphics-device can't break src.core.event-handler.
Position
Below the diagonal: src.platform.graphics.graphics-device uses a module listed above it, which is the healthy direction.
src.platform.graphics.render-pass uses src.platform.graphics.frame-pass, so a change to src.platform.graphics.frame-pass can break src.platform.graphics.render-pass, while a change to src.platform.graphics.render-pass can't break src.platform.graphics.frame-pass.
Position
Below the diagonal: src.platform.graphics.render-pass uses a module listed above it, which is the healthy direction.
src.platform.sound.instance uses src.core.event-handler, so a change to src.core.event-handler can break src.platform.sound.instance, while a change to src.platform.sound.instance can't break src.core.event-handler.
Position
Below the diagonal: src.platform.sound.instance uses a module listed above it, which is the healthy direction.
src.scene.geometry.cone-base-geometry uses src.scene.geometry.geometry, so a change to src.scene.geometry.geometry can break src.scene.geometry.cone-base-geometry, while a change to src.scene.geometry.cone-base-geometry can't break src.scene.geometry.geometry.
Position
Below the diagonal: src.scene.geometry.cone-base-geometry uses a module listed above it, which is the healthy direction.
scripts.esm.camera-frame-effect uses src.framework.script.script, so a change to src.framework.script.script can break scripts.esm.camera-frame-effect, while a change to scripts.esm.camera-frame-effect can't break src.framework.script.script.
Position
Below the diagonal: scripts.esm.camera-frame-effect uses a module listed above it, which is the healthy direction.
scripts.esm.gsplat.gsplat-shader-effect uses src.framework.script.script, so a change to src.framework.script.script can break scripts.esm.gsplat.gsplat-shader-effect, while a change to scripts.esm.gsplat.gsplat-shader-effect can't break src.framework.script.script.
Position
Below the diagonal: scripts.esm.gsplat.gsplat-shader-effect uses a module listed above it, which is the healthy direction.
src.extras.gizmo.drag-gizmo uses src.extras.gizmo.gizmo, so a change to src.extras.gizmo.gizmo can break src.extras.gizmo.drag-gizmo, while a change to src.extras.gizmo.drag-gizmo can't break src.extras.gizmo.gizmo.
Position
Below the diagonal: src.extras.gizmo.drag-gizmo uses a module listed above it, which is the healthy direction.
src.scene.graphics.render-pass-shader-quad uses src.platform.graphics.render-pass, so a change to src.platform.graphics.render-pass can break src.scene.graphics.render-pass-shader-quad, while a change to src.scene.graphics.render-pass-shader-quad can't break src.platform.graphics.render-pass.
Position
Below the diagonal: src.scene.graphics.render-pass-shader-quad uses a module listed above it, which is the healthy direction.
scripts.esm.lens-flare uses src.framework.script.script, so a change to src.framework.script.script can break scripts.esm.lens-flare, while a change to scripts.esm.lens-flare can't break src.framework.script.script.
Position
Below the diagonal: scripts.esm.lens-flare uses a module listed above it, which is the healthy direction.
scripts.esm.lens-flare uses scripts.esm.camera-frame-effect, so a change to scripts.esm.camera-frame-effect can break scripts.esm.lens-flare, while a change to scripts.esm.lens-flare can't break scripts.esm.camera-frame-effect.
Position
Below the diagonal: scripts.esm.lens-flare uses a module listed above it, which is the healthy direction.
src.extras.gizmo.handle.handle-gizmo uses src.extras.gizmo.drag-gizmo, so a change to src.extras.gizmo.drag-gizmo can break src.extras.gizmo.handle.handle-gizmo, while a change to src.extras.gizmo.handle.handle-gizmo can't break src.extras.gizmo.drag-gizmo.
Position
Below the diagonal: src.extras.gizmo.handle.handle-gizmo uses a module listed above it, which is the healthy direction.
src.extras.gizmo.transform.transform-gizmo uses src.extras.gizmo.drag-gizmo, so a change to src.extras.gizmo.drag-gizmo can break src.extras.gizmo.transform.transform-gizmo, while a change to src.extras.gizmo.transform.transform-gizmo can't break src.extras.gizmo.drag-gizmo.
Position
Below the diagonal: src.extras.gizmo.transform.transform-gizmo uses a module listed above it, which is the healthy direction.
src.extras.gizmo.handle.shape-gizmo uses src.extras.gizmo.handle.handle-gizmo, so a change to src.extras.gizmo.handle.handle-gizmo can break src.extras.gizmo.handle.shape-gizmo, while a change to src.extras.gizmo.handle.shape-gizmo can't break src.extras.gizmo.handle.handle-gizmo.
Position
Below the diagonal: src.extras.gizmo.handle.shape-gizmo uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 58% · Adequate · gated by D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
40
High / Critical
A03:2025 — Software Supply Chain Failures
16
High / Critical
A07:2025 — Authentication Failures
10
High / Critical
Roadmap
Begin by resolving the ten high-severity dependency vulnerabilities and the six historical secret exposures, prioritizing fixes in REDACTED and REDACTED. Next, address the single platform end-of-life runtime issue by updating the .nvmrc configuration. Finally, improve system stability and performance by replacing synchronous file and process operations with their asynchronous counterparts across the TypeScript and JavaScript codebase.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (6).
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 60
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 1124
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 112
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 10
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 68 of 68 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 68 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1280 of 1296 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D4 Code Duplication — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The language model for this repository listed its production source (.html) but exposed no token stream for any of it, so nothing reached the token comparison.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the mocha run in the repository root produced no per-test report (GET: /test/assets/someurl.glb - Error 404. Retrying in 2 ms). This is OUR limitation, not a defect in the repo — it is excluded from the score.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the mocha suite in the repository root was NOT MEASURED: the mocha run in the repository root produced no per-test report (GET: /test/assets/someurl.glb - Error 404. Retrying in 2 ms). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (package.json), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (serve). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and none applies: this repository publishes a library and deploys nothing (no container, IaC or deployment manifest), so it holds no runtime state of its own. Any data-access dependency it declares is the store it is a CLIENT for, not one it operates. The DR control belongs to whoever runs that data.
R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 624 further occurrence(s) are not listed individually; the score already reflects all 664.
R3 Large Files — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 101 further occurrence(s) are not listed individually; the score already reflects all 141.
R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 95 further occurrence(s) are not listed individually; the score already reflects all 135.
S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 1450 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled certificate validation and obsolete TLS versions, and none was found. The server controls this dimension also scores were not assessed, so no score is given.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
316 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was constructor at 94. A further 13 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being WebglTexture.initialize at 76 — they are counted neither in the figure above nor in this dimension's score. 9 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/platform/graphics/constants.js (getPixelFormatArrayType at 32), src/platform/graphics/constants.js (constants.getPixelFormatArrayType at 32), src/scene/gsplat/gsplat-sog-data.js (GSplatSogIterator.constructor at 24), src/platform/graphics/uniform-buffer-format.js (UniformFormat.constructor at 23), scripts/physics/vehicle.js (vehicle.VehicleControls.initialize at 21), and 4 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 183 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 10 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with constructor (cyclomatic 94), TextElement._updateMeshes (cyclomatic 90), _updateMeshes (cyclomatic 90). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 10 together lifts Cyclomatic Complexity from 6.1 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 349 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 9 bodies over 120 down to 120 or less in Cognitive Complexity — start with _updateMeshes (cognitive 232), TextElement._updateMeshes (cognitive 223), upload (cognitive 212). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 9 together lifts Cognitive Complexity from 3.3 to about 4.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.0 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 37 ClassTooLong finding(s) in God Classes — start with component.js (8), webgl-graphics-device.js, text-element.js. — One of this dimension's main actionable groups (37 warning-level).
Resolve the 33 FileTooLong finding(s) in God Classes — start with component.js (3), webgl-graphics-device.js, text-element.js. — One of this dimension's main actionable groups (33 warning-level).
Resolve the 27 TooManyMethods finding(s) in God Classes — start with component.js (7), webgl-graphics-device.js, webgpu-graphics-device.js. — One of this dimension's main actionable groups (27 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 15 Low cohesion finding(s) in Cohesion (LCOM4) — start with system.js (3), component.js (2), graph-node.js. — One of this dimension's main actionable groups (15 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Line coverage 77.3% — 150 file(s) below 50%. Measured from the JavaScript/TypeScript suite (mocha + c8 via `npm ci --ignore-scripts` in the repository root).
Resolve the 150 Low coverage finding(s) in Code Coverage — start with basis.js (2), read-stream.js, tags-cache.js. — One of this dimension's main actionable groups (150 warning-level).
Enforce Code Coverage in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
4214 test methods: 4214 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 4214 `it`/`test` case(s) across 300 test file(s) declaring at least one; its tier split is read from package names and paths only.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.9 / 10Stronggated by 15 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
29 skipped (27 with a documented reason), 13 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 4214 tests.
No assertions: fires a drag:end event when dragging ends via touchend and stops firing drag:move events · ×13test/framework/components/element/element-drag-helper.test.mjs:211
Skipped test: assets not in asset registry get loaded after they are added to the registry · ×2test/framework/i18n/i18n.test.mjs:592
Mock-dominated test: renders one shadow for all cameras · ×5test/scene/renderer/directional-shadow-bounds.test.mjs:73
Skipped (documented): evaluates the transmission of area lights with the flipped normal · ×27test/scene/shader-lib/lit-diffuse-transmission.test.mjs:200
What to do
Resolve the 13 No assertions finding(s) in Test Quality — start with element-drag-helper.test.mjs (10), auto-exposure-effect.test.mjs, frame-pass-camera-frame.test.mjs. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 5 Mock-dominated test finding(s) in Test Quality — start with directional-shadow-bounds.test.mjs (2), directional-shadow-cull-requests.test.mjs, local-shadow-cull-requests.test.mjs. — One of this dimension's main actionable groups (5 recommendation-level).
Resolve the 2 Skipped test finding(s) in Test Quality — start with i18n.test.mjs (2). — One of this dimension's main actionable groups (2 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
0 outdated direct production npm dependency(ies) of 2 graded, 0 pinning defect(s), across 2 package.json (1 of them the product) and 2 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 1 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Deprecated: eslintpackage.json:97
Deprecated: sourcemap-codecREDACTED:8656
What to do
Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with package.json. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 2 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 2 production dependency(ies) this repository's committed lockfile resolves, across 1 product package.json manifest(s). Its 56 `devDependencies` declaration(s) are excluded: a consumer installs none of them. ★ DEPTH: this is the DIRECT production set the lockfile resolves, NOT the transitive closure — only one of the four lock dialects this pass reads states a full graph, so a banned licence pulled in only by a dependency's OWN dependencies is outside this verdict, exactly as the JVM arm's declaration-site verdict is. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. This repository publishes itself under MIT, which is its own choice and is not judged here.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: src/scene/renderer/shadow-renderer.js (24×58=1392); src/platform/graphics/webgl/webgl-graphics-device.js (28×47=1316); src/scene/renderer/forward-renderer.js (30×37=1110) Repeated repair below the complexity floor: examples/src/examples/gaussian-splatting/depth-of-field.example.mjs (4 of 4 changes were fixes); examples/src/examples/gizmos/transform-rotate.example.mjs (3 of 5 changes were fixes); examples/src/examples/gizmos/transform-scale.example.mjs (3 of 5 changes were fixes)
Resolve the 46 Hotspot finding(s) in Churn × Complexity Hotspots — start with shadow-renderer.js, webgl-graphics-device.js, forward-renderer.js. — One of this dimension's main actionable groups (46 warning-level).
Resolve the 12 Repeated repair finding(s) in Churn × Complexity Hotspots — start with depth-of-field.example.mjs, transform-rotate.example.mjs, transform-scale.example.mjs. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor6.8 / 10Adequate✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
218 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/platform/graphics/webgpu/webgpu-graphics-device.js. Counted over 684 of the 1376 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)
What to do
Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted task-comment markers across 0 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 build units (npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
7 finding(s): 0 critical, 7 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
40 finding(s): 0 critical, 35 high, 5 medium, 0 low. 32 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 4 file(s) — `examples/assets/scripts/utils/area-light-lut-bin-gen.js`, `examples/assets/wasm/ammo/ammo.wasm.js`, `examples/assets/wasm/draco/draco.js`, `scripts/spine/playcanvas-spine.4.3.js` — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 32 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (32 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
Resolve the 10 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (10). — One of this dimension's main actionable groups (10 issue-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
9 of 684 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/framework/xr/xr-anchors.js. Counted over 684 of the 1376 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 5 Boundary-crossing change coupling finding(s) in Change Coupling — start with render-pass-compose.js (2), camera-frame.js (2), deprecated.js. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 20 Change coupling finding(s) in Change Coupling — start with gsplat-work-buffer-render-pass.js (2), gsplat-params.js (2), stdDeclaration.js. — One of this dimension's main actionable groups (20 warning-level).
Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with gsplatCommon.js, gsplat-manager.js, standard-material-options-builder.js. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 2 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
End-of-life runtime: Node.js 18.nvmrc:1
What to do
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with .nvmrc. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
The guard above `return point;` also returns `point`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — src/extras/gizmo/transform/transform-gizmo.js:805
`_onResolutionChange` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/framework/components/element/image-element.js:372
`_onTextureChange` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/framework/components/element/image-element.js:756
`_onTextureRemove` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/framework/components/element/image-element.js:760
`_onFontRemove` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/framework/components/element/text-element.js:1544
`propertyChanged` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/platform/graphics/null/null-texture.js:10
The guard above `return false;` also returns `false`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — src/scene/gsplat-unified/gsplat-hybrid-renderer.js:987
`_onMaterialChange` has an empty body — confirm it's an intentional no-op and not an unfinished method. — src/framework/components/element/image-element.js:717
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×2) — test/framework/i18n/i18n.test.mjs:592, test/framework/i18n/i18n.test.mjs:609
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 1 of 2 project(s) that lack one — worth up to 1 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/javascript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 23384 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:12
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/javascript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`fs.readFileSync` in `takeThumbnails` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — examples/utils/thumbnails.mjs:173
`fs.unlinkSync` in `takeThumbnails` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — examples/utils/thumbnails.mjs:186
`fs.rmSync` in `takeScreenshots` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — examples/utils/thumbnails.mjs:207
`fs.existsSync` in `takeScreenshots` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — examples/utils/thumbnails.mjs:209, examples/utils/thumbnails.mjs:222
`fs.mkdirSync` in `takeScreenshots` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — examples/utils/thumbnails.mjs:210
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
74 duplicated blocks under src/ have copies in at least two of the sibling directories core, deprecated, extras, framework, platform, scene — 22 of them are reported below, and 52 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 74 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 74 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 74 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/framework/components/gsplat/component.js:423
63 duplicated blocks under src/framework/components/ have copies in at least two of the sibling directories anim, animation, audio-listener, button, camera, collision (+17 more sibling(s) not listed) — 48 of them are reported below, and 15 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 63 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 63 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 63 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/framework/components/model/component.js:158
36 duplicated blocks under the repository root have copies in at least two of the sibling directories scripts, src — 15 of them are reported below, and 21 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 36 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 36 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 36 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — scripts/esm/parsers/obj-model.mjs:31
22 duplicated blocks under src/extras/effects/ have copies in at least two of the sibling directories auto-exposure, bloom, cas, color-enhance, dof, fringing (+7 more sibling(s) not listed) — 11 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 22 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/extras/effects/auto-exposure/passes/render-pass-histogram-step.js:43
17 duplicated blocks under src/scene/ have copies in at least two of the sibling directories composition, geometry, graphics, gsplat, gsplat-unified, lighting (+5 more sibling(s) not listed) — 9 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 17 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 17 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 17 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/scene/gsplat-unified/gsplat-params.js:957
10 duplicated blocks under src/framework/ have copies in at least two of the sibling directories anim, asset, components, gsplat, handlers, i18n (+3 more sibling(s) not listed) — 6 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 10 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/framework/anim/evaluator/anim-target.js:48
5 duplicated blocks under src/platform/graphics/ have copies in at least two of the sibling directories null, webgl, webgpu — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/platform/graphics/webgl/webgl-xr-bridge.js:265
src/extras/gizmo/transform/scale-gizmo.js:20 · src/extras/gizmo/transform/translate-gizmo.js:22 — the two spans are one implementation copied and then locally edited — 1964 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extras/gizmo/transform/scale-gizmo.js:20
src/framework/components/model/component.js:158 · src/framework/components/render/component.js:207 — the two spans are one implementation copied and then locally edited — 1535 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/framework/components/model/component.js:158
scripts/esm/first-person-controller.mjs:24 · scripts/esm/third-person-controller.mjs:24 — the two spans are one implementation copied and then locally edited — 1839 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/esm/first-person-controller.mjs:24
src/scene/shader-lib/glsl/collections/shader-chunks-glsl.js:1 · src/scene/shader-lib/wgsl/collections/shader-chunks-wgsl.js:1 — these 2 files are line-for-line copies of one another — 170 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — src/scene/shader-lib/glsl/collections/shader-chunks-glsl.js:1
src/core/math/vec3.js:108 · src/core/math/vec4.js:111 — the two spans are one implementation copied and then locally edited — 1178 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/core/math/vec3.js:108
scripts/esm/gsplat/gsplat-image.mjs:32 · scripts/esm/gsplat/gsplat-text.mjs:74 — the two spans are one implementation copied and then locally edited — 779 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/esm/gsplat/gsplat-image.mjs:32
src/extras/gizmo/shape/arrow-shape.js:15 · src/extras/gizmo/shape/boxline-shape.js:15 — the two spans are one implementation copied and then locally edited — 662 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extras/gizmo/shape/arrow-shape.js:15
src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:116 · src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog.js:83 — the two spans are one implementation copied and then locally edited — 725 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:116
src/platform/graphics/webgl/webgl-texture.js:540 · src/platform/graphics/webgl/webgl-texture.js:763 — the two spans are one implementation copied and then locally edited — 412 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/platform/graphics/webgl/webgl-texture.js:540
src/framework/parsers/sog-bundle.js:141 · src/framework/parsers/sog.js:81 — the two spans are one implementation copied and then locally edited — 531 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/framework/parsers/sog-bundle.js:141
scripts/spine/playcanvas-spine.4.3.js:10327 · scripts/spine/playcanvas-spine.4.3.js:10473 — the two spans are one implementation copied and then locally edited — 595 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/spine/playcanvas-spine.4.3.js:10327
src/scene/gsplat-unified/gsplat-hybrid-renderer.js:118 · src/scene/gsplat-unified/gsplat-quad-renderer.js:32 — the two spans are one implementation copied and then locally edited — 383 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/scene/gsplat-unified/gsplat-hybrid-renderer.js:118
src/scene/light.js:571 · src/scene/light.js:790 — the two spans are one implementation copied and then locally edited — 280 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/scene/light.js:571
src/extras/gizmo/handle/cone-gizmo.js:19 · src/extras/gizmo/handle/cylinder-gizmo.js:21 — the two spans are one implementation copied and then locally edited — 591 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extras/gizmo/handle/cone-gizmo.js:19
src/framework/components/button/system.js:23 · src/framework/components/scroll-view/system.js:27 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/framework/components/button/system.js:23
src/extras/input/sources/dual-gesture-source.js:165 · src/extras/input/sources/single-gesture-source.js:126 — the two spans are one implementation copied and then locally edited — 395 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extras/input/sources/dual-gesture-source.js:165
src/framework/components/rigid-body/component.js:205 · src/framework/components/rigid-body/component.js:403 — the two spans are one implementation copied and then locally edited — 283 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/framework/components/rigid-body/component.js:205
src/framework/components/element/image-element.js:1042 · src/framework/components/element/image-element.js:1204 — the two spans are one implementation copied and then locally edited — 324 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/framework/components/element/image-element.js:1042
src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:452 · src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:574 — the two spans are one implementation copied and then locally edited — 470 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:452
scripts/posteffects/posteffect-brightnesscontrast.js:37 · scripts/posteffects/posteffect-huesaturation.js:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/posteffects/posteffect-brightnesscontrast.js:37
src/core/math/quat.js:36 · src/core/math/vec4.js:25 — the two spans are one implementation copied and then locally edited — 347 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/core/math/quat.js:36
src/platform/graphics/index-buffer.js:98 · src/platform/graphics/vertex-buffer.js:77 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/platform/graphics/index-buffer.js:98
src/extras/gizmo/handle/capsule-gizmo.js:20 · src/extras/gizmo/handle/cylinder-gizmo.js:15 — the two spans are one implementation copied and then locally edited — 458 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extras/gizmo/handle/capsule-gizmo.js:20
src/scene/gsplat-unified/gsplat-interval-compaction.js:164 · src/scene/gsplat-unified/gsplat-projector.js:234 — the two spans are one implementation copied and then locally edited — 265 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/scene/gsplat-unified/gsplat-interval-compaction.js:164
src/scene/materials/standard-material.js:988 · src/scene/materials/standard-material.js:1658 — the two spans are one implementation copied and then locally edited — 256 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/scene/materials/standard-material.js:988
src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:20 · src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:20 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:20
scripts/posteffects/posteffect-horizontaltiltshift.js:42 · scripts/posteffects/posteffect-verticaltiltshift.js:42 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/posteffects/posteffect-horizontaltiltshift.js:42
src/scene/shader-lib/glsl/collections/particle-chunks-glsl.js:43 · src/scene/shader-lib/wgsl/collections/particle-chunks-wgsl.js:43 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/scene/shader-lib/glsl/collections/particle-chunks-glsl.js:43
scripts/posteffects/posteffect-blend.js:46 · scripts/posteffects/posteffect-outline.js:74 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/posteffects/posteffect-blend.js:46
src/framework/components/model/system.js:32 · src/framework/components/render/system.js:35 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/framework/components/model/system.js:32
scripts/spine/playcanvas-spine.4.3.js:3129 · scripts/spine/playcanvas-spine.4.3.js:3347 — the two spans are one implementation copied and then locally edited — 352 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/spine/playcanvas-spine.4.3.js:3129
src/framework/xr/xr-mesh-detection.js:28 · src/framework/xr/xr-plane-detection.js:28 — the two spans are one implementation copied and then locally edited — 239 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/framework/xr/xr-mesh-detection.js:28
src/extras/input/sources/dual-gesture-source.js:88 · src/extras/input/sources/single-gesture-source.js:54 — the two spans are one implementation copied and then locally edited — 239 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extras/input/sources/dual-gesture-source.js:88
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
readAnimation has cyclomatic complexity 132 and cognitive complexity 418; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/spine/playcanvas-spine.4.3.js:12850
readAnimation has cyclomatic complexity 118 and cognitive complexity 291; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/spine/playcanvas-spine.4.3.js:10183
readSkeletonData has cyclomatic complexity 106 and cognitive complexity 220; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/spine/playcanvas-spine.4.3.js:9557
readSkeletonData has cyclomatic complexity 101 and cognitive complexity 290; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/spine/playcanvas-spine.4.3.js:12237
initializeComponentData has cyclomatic complexity 85 and cognitive complexity 130; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/framework/components/element/system.js:107
_updateMeshes has cyclomatic complexity 84 and cognitive complexity 223; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/framework/components/element/text-element.js:864
upload has cyclomatic complexity 80 and cognitive complexity 212; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/platform/graphics/webgl/webgl-texture.js:481
constructor has cyclomatic complexity 74 and cognitive complexity 84; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/platform/graphics/render-target.js:388
writeStandardMaterial has cyclomatic complexity 60 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/extras/exporters/gltf-exporter.js:491
_updateText has cyclomatic complexity 58 and cognitive complexity 123; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/framework/components/element/text-element.js:376
_validateCopy has cyclomatic complexity 57 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/platform/graphics/texture.js:1507
rawToValue has cyclomatic complexity 56 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/framework/script/script-attributes.js:20
cullShadowCastersOmni has cyclomatic complexity 55 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/scene/renderer/shadow-renderer.js:302
update has cyclomatic complexity 50 and cognitive complexity 160; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/spine/playcanvas-spine.4.3.js:8364
_preprocess has cyclomatic complexity 45 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:232
update has cyclomatic complexity 45 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/scene/particle-system/cpu-updater.js:98
validate has cyclomatic complexity 43 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/scene/materials/standard-material-validator.js:72
constructor has cyclomatic complexity 43 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/platform/graphics/texture.js:295
createShaderDefinition has cyclomatic complexity 42 and cognitive complexity 82; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/scene/shader-lib/programs/standard.js:355
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files6.1 / 10Adequate✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
src/platform/graphics/webgl/webgl-graphics-device.js has 2813 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/platform/graphics/webgl/webgl-graphics-device.js:1
src/framework/components/element/component.js has 2610 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/element/component.js:1
src/scene/materials/standard-material.js has 2325 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/materials/standard-material.js:1
src/platform/graphics/constants.js has 2165 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/platform/graphics/constants.js:1
src/framework/components/particle-system/component.js has 2096 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/particle-system/component.js:1
src/framework/components/element/text-element.js has 2018 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/element/text-element.js:1
src/platform/graphics/webgpu/webgpu-graphics-device.js has 1883 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/platform/graphics/webgpu/webgpu-graphics-device.js:1
src/framework/app-base.js has 1854 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/app-base.js:1
src/scene/mesh-instance.js has 1835 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/mesh-instance.js:1
src/platform/graphics/graphics-device.js has 1812 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/platform/graphics/graphics-device.js:1
src/scene/graph-node.js has 1676 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/graph-node.js:1
src/extras/effects/dynamic-sky/dynamic-sky-effect.js has 1604 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extras/effects/dynamic-sky/dynamic-sky-effect.js:1
src/framework/parsers/glb-parser.js has 1589 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/parsers/glb-parser.js:1
src/platform/graphics/texture.js has 1508 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/platform/graphics/texture.js:1
src/scene/materials/material.js has 1498 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/materials/material.js:1
src/framework/components/camera/component.js has 1455 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/camera/component.js:1
src/framework/components/light/component.js has 1403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/light/component.js:1
src/scene/constants.js has 1287 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/constants.js:1
src/scene/renderer/renderer.js has 1265 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/renderer/renderer.js:1
src/framework/components/joint/component.js has 1234 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/joint/component.js:1
src/core/math/mat4.js has 1215 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/math/mat4.js:1
REDACTED has 1172 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/framework/components/rigid-body/component.js has 1152 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/rigid-body/component.js:1
src/framework/components/element/image-element.js has 1148 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/element/image-element.js:1
src/scene/camera.js has 1138 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/camera.js:1
src/scene/gsplat-unified/gsplat-world.js has 1133 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/gsplat-unified/gsplat-world.js:1
src/framework/components/scroll-view/component.js has 1130 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/scroll-view/component.js:1
src/scene/light.js has 1120 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/light.js:1
src/framework/components/model/component.js has 1112 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/model/component.js:1
src/framework/components/render/component.js has 1105 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/render/component.js:1
src/platform/graphics/render-target.js has 1078 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/platform/graphics/render-target.js:1
src/extras/exporters/gltf-exporter.js has 1076 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extras/exporters/gltf-exporter.js:1
src/framework/components/button/component.js has 1070 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/button/component.js:1
src/framework/xr/xr-manager.js has 1070 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/xr/xr-manager.js:1
src/scene/gsplat-unified/gsplat-params.js has 1052 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/gsplat-unified/gsplat-params.js:1
src/scene/scene.js has 1031 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/scene.js:1
src/scene/mesh.js has 1022 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/scene/mesh.js:1
src/framework/components/rigid-body/system.js has 1020 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/rigid-body/system.js:1
src/framework/input/element-input.js has 1020 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/input/element-input.js:1
src/framework/components/script/component.js has 1013 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/framework/components/script/component.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage9.1 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — scripts/spine/playcanvas-spine.4.3.js:1, scripts/esm/water.mjs:1, scripts/esm/xr/xr-menu.mjs:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
What to do
Bump outdated dependencies to current versions to limit upgrade debt.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code8.7 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 146 application, 12 tooling and 334 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (146 application, 12 tooling, 334 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×4) — examples/utils/generate-ui-atlas.mjs, examples/src/app/events.js, examples/templates/controls.jsx, …
Nothing imports this binding — it is safe to review for removal. (×17) — examples/src/app/paths.mjs:5, examples/utils/build-examples.mjs:67, src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-interval-cull.js:111, …
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×8) — scripts/esm/camera-controls.mjs:122, src/scene/graphics/reproject-texture.js:162, test/type-tests/element-input.test.ts:11, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. — test/fixtures.mjs:3
Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`extend` is exported and takes `ex: object` from its caller, and it calls itself at line 42 (`extend`) with a piece of `ex` (and at line 44) — and nowhere in `extend` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `extend` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/core/core.js:42
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 0/4 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — src/framework/parsers/ply.js:591, scripts/esm/vat/vat-characters.mjs:309
`downloadArrayBuffer` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/framework/parsers/sog-bundle.js:102
`_loadProfile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/esm/xr/xr-controllers.mjs:272
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped3.5 / 10Weak✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`html` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/extras/gizmo/overlay/readout.js:61
`text` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/framework/font/canvas-font.js:474
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×5) — src/platform/graphics/webgpu/webgpu-xr-bridge.js:95, src/platform/graphics/webgpu/webgpu-xr-bridge.js:227, src/framework/handlers/basis.js:43, …
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — src/framework/xr/xr-anchors.js:406
`catch (ex)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — src/framework/xr/xr-anchors.js:457
`.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — scripts/esm/xr/xr-controllers.mjs:138
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
3/7 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 61 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server (no Express, Fastify, Koa, Hono, NestJS or similar app, no Next.js/SvelteKit/Nuxt server route, no edge function), creates no Supabase tables and talks to no hosted backend. Access control is therefore N/A here — a browser application or library is authorized by the server it calls, not by itself; a client-side route guard hides a page and authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, html not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No hand-written C# or Visual Basic source; comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.js,.mjs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D4 Code Duplication — Duplication not measured — .html not exposed to the token comparison
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Not applicable — this npm build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — This repository's JavaScript/TypeScript source (1 module(s), 1383 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage data present for 1376 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not applicable: TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
S1 Web-Security Posture — Not assessed: 1450 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. That half of the dimension is clean, but it is not scored on its own: a C# repository with the same clean reading is scored on its server controls as well, or is N/A for having no web surface, and neither can be decided here. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Boundary-crossing change coupling: render-pass-compose.js ↔ compose.js src/extras/render-passes/render-pass-compose.js:1— `src/extras/render-passes/render-pass-compose.js` (context extras) and `src/scene/shader-lib/wgsl/chunks/render-pass/frag/compose/compose.js` (context scene) sit in DIFFERENT parts of the tree yet change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `dfdaedfe` feat: Convert depth of field to a CameraFrame effect (#9718); `fda26645` Configure CameraFrame effects when the camera frame is updated (#9686); `7730e396` refactor: Convert the sharpening, fringing, color enhance and color L… — run `git show` on any of them.
Boundary-crossing change coupling: render-pass-compose.js ↔ compose.js src/extras/render-passes/render-pass-compose.js:1— `src/extras/render-passes/render-pass-compose.js` (context extras) and `src/scene/shader-lib/glsl/chunks/render-pass/frag/compose/compose.js` (context scene) sit in DIFFERENT parts of the tree yet change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `dfdaedfe` feat: Convert depth of field to a CameraFrame effect (#9718); `fda26645` Configure CameraFrame effects when the camera frame is updated (#9686); `7730e396` refactor: Convert the sharpening, fringing, color enhance and color L… — run `git show` on any of them.
Boundary-crossing change coupling: camera-frame.js ↔ compose.js src/extras/render-passes/camera-frame.js:1— `src/extras/render-passes/camera-frame.js` (context extras) and `src/scene/shader-lib/wgsl/chunks/render-pass/frag/compose/compose.js` (context scene) sit in DIFFERENT parts of the tree yet change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `dfdaedfe` feat: Convert depth of field to a CameraFrame effect (#9718); `fda26645` Configure CameraFrame effects when the camera frame is updated (#9686); `7730e396` refactor: Convert the sharpening, fringing, color enhance and color L… — run `git show` on any of them.
Boundary-crossing change coupling: camera-frame.js ↔ compose.js src/extras/render-passes/camera-frame.js:1— `src/extras/render-passes/camera-frame.js` (context extras) and `src/scene/shader-lib/glsl/chunks/render-pass/frag/compose/compose.js` (context scene) sit in DIFFERENT parts of the tree yet change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `dfdaedfe` feat: Convert depth of field to a CameraFrame effect (#9718); `fda26645` Configure CameraFrame effects when the camera frame is updated (#9686); `7730e396` refactor: Convert the sharpening, fringing, color enhance and color L… — run `git show` on any of them.
Boundary-crossing change coupling: deprecated.js ↔ blend-state.js src/deprecated/deprecated.js:1— `src/deprecated/deprecated.js` (context deprecated) and `src/platform/graphics/blend-state.js` (context platform) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `fdd4bc72` refactor: Move deprecated math and graphics shims (#9083); `583b8fe5` Remove final WebGL1 extensions and simplify code that used them (#6336); `e63821d5` Change to static members of BlendState (#5303) — run `git show` on any of them.
Unlisted import 'serve-handler' test/fixtures.mjs:3— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Hotspot: src/scene/renderer/shadow-renderer.js src/scene/renderer/shadow-renderer.js:302— src/scene/renderer/shadow-renderer.js changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in ShadowRenderer.cullShadowCastersOmni at line 302. 5 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/renderer/shadow-renderer.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/platform/graphics/webgl/webgl-graphics-device.js src/platform/graphics/webgl/webgl-graphics-device.js:230— src/platform/graphics/webgl/webgl-graphics-device.js changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in WebglGraphicsDevice.constructor at line 230. 5 of those changes were fix/bug commits, and the other 23 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/platform/graphics/webgl/webgl-graphics-device.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/renderer/forward-renderer.js src/scene/renderer/forward-renderer.js:665— src/scene/renderer/forward-renderer.js changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in ForwardRenderer.buildFrameGraph at line 665. 4 of those changes were fix/bug commits, and the other 26 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/renderer/forward-renderer.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/platform/graphics/webgpu/webgpu-graphics-device.js src/platform/graphics/webgpu/webgpu-graphics-device.js:2121— src/platform/graphics/webgpu/webgpu-graphics-device.js changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in WebgpuGraphicsDevice.copyRenderTarget at line 2121. 12 of those changes were fix/bug commits, and the other 23 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/platform/graphics/webgpu/webgpu-graphics-device.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/platform/graphics/render-target.js src/platform/graphics/render-target.js:388— src/platform/graphics/render-target.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in RenderTarget.constructor at line 388. 1 of those changes was a fix/bug commit, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/platform/graphics/render-target.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/framework/components/element/text-element.js src/framework/components/element/text-element.js:864— src/framework/components/element/text-element.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in TextElement._updateMeshes at line 864. 4 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/framework/components/element/text-element.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/framework/components/element/system.js src/framework/components/element/system.js:107— src/framework/components/element/system.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 85 in ElementComponentSystem.initializeComponentData at line 107. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/framework/components/element/system.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/platform/graphics/texture.js src/platform/graphics/texture.js:1507— src/platform/graphics/texture.js changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in Texture._validateCopy at line 1507. 6 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/platform/graphics/texture.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/framework/app-base.js src/framework/app-base.js:573— src/framework/app-base.js changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AppBase.init at line 573. 5 of those changes were fix/bug commits, and the other 28 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/framework/app-base.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/renderer/renderer.js src/scene/renderer/renderer.js:502— src/scene/renderer/renderer.js changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Renderer.setCameraUniforms at line 502. 3 of those changes were fix/bug commits, and the other 27 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/renderer/renderer.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/materials/standard-material-options-builder.js src/scene/materials/standard-material-options-builder.js:220— src/scene/materials/standard-material-options-builder.js changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in StandardMaterialOptionsBuilder._updateMaterialOptions at line 220. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/materials/standard-material-options-builder.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/mesh-instance.js src/scene/mesh-instance.js:1953— src/scene/mesh-instance.js changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in MeshInstance.getMaterialBindGroup at line 1953. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/mesh-instance.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/shader-lib/programs/standard.js src/scene/shader-lib/programs/standard.js:355— src/scene/shader-lib/programs/standard.js changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in ShaderGeneratorStandard.createShaderDefinition at line 355. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/shader-lib/programs/standard.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/extras/mini-stats/mini-stats.js src/extras/mini-stats/mini-stats.js:792— src/extras/mini-stats/mini-stats.js changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in MiniStats.rebuildGeometry at line 792. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/extras/mini-stats/mini-stats.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/platform/graphics/webgl/webgl-texture.js src/platform/graphics/webgl/webgl-texture.js:481— src/platform/graphics/webgl/webgl-texture.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in WebglTexture.upload at line 481. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/platform/graphics/webgl/webgl-texture.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/gsplat-unified/gsplat-world.js src/scene/gsplat-unified/gsplat-world.js:452— src/scene/gsplat-unified/gsplat-world.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in GSplatWorld.update at line 452. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-world.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/batching/batch-manager.js src/scene/batching/batch-manager.js:686— src/scene/batching/batch-manager.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in BatchManager.create at line 686. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/batching/batch-manager.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/renderer/render-pass-forward.js src/scene/renderer/render-pass-forward.js:519— src/scene/renderer/render-pass-forward.js changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in RenderPassForward.renderLayerRenderStep at line 519. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/renderer/render-pass-forward.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/frame-graph.js src/scene/frame-graph.js:186— src/scene/frame-graph.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in FrameGraph._compilePasses at line 186. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/frame-graph.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/framework/asset/asset-registry.js src/framework/asset/asset-registry.js:462— src/framework/asset/asset-registry.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in AssetRegistry.load at line 462. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/framework/asset/asset-registry.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/framework/lightmapper/lightmapper.js src/framework/lightmapper/lightmapper.js:932— src/framework/lightmapper/lightmapper.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Lightmapper.bakeInternal at line 932. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/framework/lightmapper/lightmapper.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/gsplat-unified/gsplat-octree-instance.js src/scene/gsplat-unified/gsplat-octree-instance.js:635— src/scene/gsplat-unified/gsplat-octree-instance.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in GSplatOctreeInstance.applyLodChanges at line 635. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-octree-instance.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/extras/exporters/gltf-exporter.js src/extras/exporters/gltf-exporter.js:491— src/extras/exporters/gltf-exporter.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in GltfExporter.writeStandardMaterial at line 491. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/extras/exporters/gltf-exporter.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/scene/gsplat-unified/gsplat-shadow-renderer.js src/scene/gsplat-unified/gsplat-shadow-renderer.js:548— src/scene/gsplat-unified/gsplat-shadow-renderer.js changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in GSplatShadowRenderer._cullEntry at line 548. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-shadow-renderer.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/platform/graphics/webgpu/webgpu-texture.js src/platform/graphics/webgpu/webgpu-texture.js:105— src/platform/graphics/webgpu/webgpu-texture.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in WebgpuTexture.create at line 105. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/platform/graphics/webgpu/webgpu-texture.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
+ 21 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file scripts/spine/playcanvas-spine.4.3.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/water.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/xr/xr-menu.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/xr/xr-navigation.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file examples/src/app/components/Example.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/annotations.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/sky/procedural-sky.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/camera-frame.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/third-person-controller.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/camera-controls.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/xr/xr-manipulation.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/blurred-planar-reflection.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/vat/vat-characters.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file utils/esbuild-build-target.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/camera/orbit-camera.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file examples/utils/vite-dev-server.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file examples/src/app/components/code-editor/CodeEditorDesktop.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file examples/src/app/components/Sidebar.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/dynamic-sky.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/first-person-controller.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/lens-flare.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/posteffects/posteffect-ssao.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/gsplat/gsplat-mesh.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/esm/gsplat/gsplat-flipbook.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file examples/src/app/monaco/languages/wgsl.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
ClassTooLong: WebglGraphicsDevice src/platform/graphics/webgl/webgl-graphics-device.js:147— ClassTooLong — 1588 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 1188 over it, 3.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TextElement src/framework/components/element/text-element.js:154— ClassTooLong — 1343 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 943 over it, 3.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ElementComponent src/framework/components/element/component.js:100— ClassTooLong — 1049 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 649 over it, 2.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WebgpuGraphicsDevice src/platform/graphics/webgpu/webgpu-graphics-device.js:69— ClassTooLong — 957 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 557 over it, 2.39× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ParticleSystemComponent src/framework/components/particle-system/component.js:137— ClassTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 345 over it, 1.86× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WebglTexture src/platform/graphics/webgl/webgl-texture.js:62— ClassTooLong — 678 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 278 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AppBase src/framework/app-base.js:130— ClassTooLong — 654 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 254 over it, 1.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ImageElement src/framework/components/element/image-element.js:280— ClassTooLong — 648 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 248 over it, 1.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ParticleEmitter src/scene/particle-system/particle-emitter.js:226— ClassTooLong — 648 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 248 over it, 1.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DynamicSkyEffect src/extras/effects/dynamic-sky/dynamic-sky-effect.js:172— ClassTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 247 over it, 1.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Mat4 src/core/math/mat4.js:48— ClassTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 235 over it, 1.59× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Light src/scene/light.js:144— ClassTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 226 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GltfExporter src/extras/exporters/gltf-exporter.js:177— ClassTooLong — 600 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 200 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Camera src/scene/camera.js:51— ClassTooLong — 578 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 178 over it, 1.45× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ScrollViewComponent src/framework/components/scroll-view/component.js:59— ClassTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 171 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Renderer src/scene/renderer/renderer.js:159— ClassTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 170 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Lightmapper src/framework/lightmapper/lightmapper.js:66— ClassTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 170 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MeshInstance src/scene/mesh-instance.js:326— ClassTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 169 over it, 1.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: XrMenu scripts/esm/xr/xr-menu.mjs:88— ClassTooLong — 556 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 156 over it, 1.39× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Texture src/platform/graphics/texture.js:70— ClassTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 144 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GraphicsDevice src/platform/graphics/graphics-device.js:58— ClassTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 142 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MiniStats src/extras/mini-stats/mini-stats.js:120— ClassTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 130 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ModelComponent src/framework/components/model/component.js:54— ClassTooLong — 480 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 80 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ElementInput src/framework/input/element-input.js:356— ClassTooLong — 475 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 75 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GraphNode src/scene/graph-node.js:122— ClassTooLong — 470 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 70 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
FileTooLong: webgl/webgl-graphics-device.js src/platform/graphics/webgl/webgl-graphics-device.js— FileTooLong — 1682 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 94% of them inside a single declaration: WebglGraphicsDevice (147-3276). The bar is 1500 significant lines; this is 182 over it, 1.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: element/text-element.js src/framework/components/element/text-element.js— FileTooLong — 1443 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: TextElement (154-2404). The bar is 500 significant lines; this is 943 over it, 2.89× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: parsers/glb-parser.js src/framework/parsers/glb-parser.js— FileTooLong — 1118 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 618 over it, 2.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: element/component.js src/framework/components/element/component.js— FileTooLong — 1074 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ElementComponent (100-3035). The bar is 500 significant lines; this is 574 over it, 2.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: webgpu/webgpu-graphics-device.js src/platform/graphics/webgpu/webgpu-graphics-device.js— FileTooLong — 1007 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: WebgpuGraphicsDevice (69-2259). The bar is 500 significant lines; this is 507 over it, 2.01× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: materials/standard-material.js src/scene/materials/standard-material.js— FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 326 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: element/image-element.js src/framework/components/element/image-element.js— FileTooLong — 815 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: ImageElement (280-1390). The bar is 500 significant lines; this is 315 over it, 1.63× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: particle-system/particle-emitter.js src/scene/particle-system/particle-emitter.js— FileTooLong — 809 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 80% of them inside a single declaration: ParticleEmitter (226-1169). The bar is 500 significant lines; this is 309 over it, 1.62× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: esm/water.mjs scripts/esm/water.mjs— FileTooLong — 785 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 285 over it, 1.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: particle-system/component.js src/framework/components/particle-system/component.js— FileTooLong — 757 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ParticleSystemComponent (137-2401). The bar is 500 significant lines; this is 257 over it, 1.51× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: dynamic-sky/dynamic-sky-effect.js src/extras/effects/dynamic-sky/dynamic-sky-effect.js— FileTooLong — 722 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: DynamicSkyEffect (172-1818). The bar is 500 significant lines; this is 222 over it, 1.44× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: exporters/gltf-exporter.js src/extras/exporters/gltf-exporter.js— FileTooLong — 718 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 84% of them inside a single declaration: GltfExporter (177-1299). The bar is 500 significant lines; this is 218 over it, 1.44× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: webgl/webgl-texture.js src/platform/graphics/webgl/webgl-texture.js— FileTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: WebglTexture (62-948). The bar is 500 significant lines; this is 212 over it, 1.42× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: framework/app-base.js src/framework/app-base.js— FileTooLong — 707 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: AppBase (130-2141). The bar is 500 significant lines; this is 207 over it, 1.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: scene/light.js src/scene/light.js— FileTooLong — 693 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: Light (144-1345). The bar is 500 significant lines; this is 193 over it, 1.39× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: graphics/constants.js src/platform/graphics/constants.js— FileTooLong — 676 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 176 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 670 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 62% of them inside a single declaration: WebgpuShaderProcessorWGSL (474-1395). The bar is 500 significant lines; this is 170 over it, 1.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: scene/mesh-instance.js src/scene/mesh-instance.js— FileTooLong — 656 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: MeshInstance (326-2096). The bar is 500 significant lines; this is 156 over it, 1.31× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: renderer/renderer.js src/scene/renderer/renderer.js— FileTooLong — 651 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: Renderer (159-1492). The bar is 500 significant lines; this is 151 over it, 1.30× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: math/mat4.js src/core/math/mat4.js— FileTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Mat4 (48-1343). The bar is 500 significant lines; this is 145 over it, 1.29× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: lightmapper/lightmapper.js src/framework/lightmapper/lightmapper.js— FileTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: Lightmapper (66-1164). The bar is 500 significant lines; this is 119 over it, 1.24× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: scene/camera.js src/scene/camera.js— FileTooLong — 608 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: Camera (51-1319). The bar is 500 significant lines; this is 108 over it, 1.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: input/element-input.js src/framework/input/element-input.js— FileTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 79% of them inside a single declaration: ElementInput (356-1219). The bar is 500 significant lines; this is 98 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: renderers/wide-line-renderer.js src/extras/renderers/wide-line-renderer.js— FileTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 97 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: scroll-view/component.js src/framework/components/scroll-view/component.js— FileTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ScrollViewComponent (59-1366). The bar is 500 significant lines; this is 82 over it, 1.16× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
TooManyMethods: WebglGraphicsDevice src/platform/graphics/webgl/webgl-graphics-device.js:147— TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: WebgpuGraphicsDevice src/platform/graphics/webgpu/webgpu-graphics-device.js:69— TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ScrollViewComponent src/framework/components/scroll-view/component.js:59— TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GraphNode src/scene/graph-node.js:122— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GraphicsDevice src/platform/graphics/graphics-device.js:58— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AppBase src/framework/app-base.js:130— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ButtonComponent src/framework/components/button/component.js:82— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ParticleSystemComponent src/framework/components/particle-system/component.js:137— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ImageElement src/framework/components/element/image-element.js:280— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ElementComponent src/framework/components/element/component.js:100— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Vec2 src/core/math/vec2.js:29— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: XrMenu scripts/esm/xr/xr-menu.mjs:88— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TextElement src/framework/components/element/text-element.js:154— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Renderer src/scene/renderer/renderer.js:159— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Vec3 src/core/math/vec3.js:34— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NullGraphicsDevice src/platform/graphics/null/null-graphics-device.js:18— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Mat4 src/core/math/mat4.js:48— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MeshInstance src/scene/mesh-instance.js:326— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AnimComponent src/framework/components/anim/component.js:54— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ModelComponent src/framework/components/model/component.js:54— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ElementInput src/framework/input/element-input.js:356— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Vec4 src/core/math/vec4.js:25— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: OverlayRenderer src/extras/gizmo/overlay/overlay-renderer.js:89— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Material src/scene/materials/material.js:109— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RenderComponent src/framework/components/render/component.js:63— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: TextElement._updateMeshes src/framework/components/element/text-element.js:864— MethodTooLong — _updateMeshes runs 395 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 295 over it, 3.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WebglGraphicsDevice.constructor src/platform/graphics/webgl/webgl-graphics-device.js:230— MethodTooLong — constructor runs 349 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 249 over it, 3.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WebglTexture.initialize src/platform/graphics/webgl/webgl-texture.js:114— MethodTooLong — initialize runs 339 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 239 over it, 3.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WebglTexture.upload src/platform/graphics/webgl/webgl-texture.js:481— MethodTooLong — upload runs 296 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 196 over it, 2.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TextElement._updateText src/framework/components/element/text-element.js:376— MethodTooLong — _updateText runs 233 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ParticleCPUUpdater.update src/scene/particle-system/cpu-updater.js:98— MethodTooLong — update runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SSAOEffect.constructor scripts/posteffects/posteffect-ssao.js:15— MethodTooLong — constructor runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConeBaseGeometry.constructor src/scene/geometry/cone-base-geometry.js:14— MethodTooLong — constructor runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RenderTarget.constructor src/platform/graphics/render-target.js:388— MethodTooLong — constructor runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Preprocessor._preprocess REDACTED:232— MethodTooLong — _preprocess runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BatchManager.create src/scene/batching/batch-manager.js:686— MethodTooLong — create runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ElementComponentSystem.getImageElementMaterial src/framework/components/element/system.js:452— MethodTooLong — getImageElementMaterial runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ElementComponentSystem.initializeComponentData src/framework/components/element/system.js:107— MethodTooLong — initializeComponentData runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WebglGraphicsDevice.draw src/platform/graphics/webgl/webgl-graphics-device.js:2128— MethodTooLong — draw runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GltfExporter.writeStandardMaterial src/extras/exporters/gltf-exporter.js:491— MethodTooLong — writeStandardMaterial runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ParticleEmitter.constructor src/scene/particle-system/particle-emitter.js:242— MethodTooLong — constructor runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Lightmapper.bakeInternal src/framework/lightmapper/lightmapper.js:932— MethodTooLong — bakeInternal runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GSplatWeather.initialize scripts/esm/gsplat/gsplat-weather.mjs:173— MethodTooLong — initialize runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SogBundleParser.load src/framework/parsers/sog-bundle.js:188— MethodTooLong — load runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DdsParser.open src/framework/parsers/texture/dds.js:29— MethodTooLong — open runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LensFlareEffect.frameUpdate src/extras/effects/lens-flare/lens-flare-effect.js:381— MethodTooLong — frameUpdate runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CameraFrame.postUpdate scripts/esm/camera-frame.mjs:842— MethodTooLong — postUpdate runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WorldClustersDebug.render src/scene/lighting/world-clusters-debug.js:54— MethodTooLong — render runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GSplatProjector.dispatch src/scene/gsplat-unified/gsplat-projector.js:643— MethodTooLong — dispatch runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ShadowRenderer.cullShadowCastersOmni src/scene/renderer/shadow-renderer.js:302— MethodTooLong — cullShadowCastersOmni runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Change coupling: stdDeclaration.js ↔ stdDeclaration.js src/scene/shader-lib/glsl/chunks/standard/frag/stdDeclaration.js:1— `src/scene/shader-lib/glsl/chunks/standard/frag/stdDeclaration.js` and `src/scene/shader-lib/wgsl/chunks/standard/frag/stdDeclaration.js` change together 92% of the time (12 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `5531b4c0` fix: Compile iridescence thickness maps on WebGL2, and fix WebGPU iri…; `d3473bb2` fix: Declare the dynamic refraction resources in the lit shader (#9691); `5be28c53` fix: Let the front end of a LitMaterial provide the dispersion (#9682) — run `git show` on any of them.
Change coupling: constants.js ↔ tracing.js src/core/constants.js:1— `src/core/constants.js` and `src/core/tracing.js` change together 79% of the time (11 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `bd285924` feat: TRACEID_BUFFERS trace, example control, and storage buffer debu…; `51a90307` Added tracing support to log all assets in the registry (#8209); `9fa2a8b0` Assign categories to constants (#6012) — run `git show` on any of them.
Change coupling: index-buffer.js ↔ vertex-buffer.js src/platform/graphics/index-buffer.js:1— `src/platform/graphics/index-buffer.js` and `src/platform/graphics/vertex-buffer.js` change together 78% of the time (18 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `f8c6b8cd` Add partial vertex and index buffer uploads (#9401); `2b743a65` fix: Register StorageBuffer for WebGPU device lose/restore (#8692); `470e3280` Use Set instead of array for buffer tracking (#8283) — run `git show` on any of them.
Change coupling: particle_cpu.js ↔ particle_init.js src/scene/shader-lib/glsl/chunks/particle/vert/particle_cpu.js:1— `src/scene/shader-lib/glsl/chunks/particle/vert/particle_cpu.js` and `src/scene/shader-lib/glsl/chunks/particle/vert/particle_init.js` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `b8f6e42d` [Fix] Small changes to avoid unset uniform warnings when particle sys…; `53ecda04` Small changes to get CPU particles to work on WebGPU (#6277) (at that commit the files were still `src/scene/shader-lib/chunks/particle/vert/particle_cpu.js` and `src/scene/shader-lib/chunks/particle/vert/particle_init.js`); `453eea9d` fx texture sampling precision to highp (#2198) (at that commit the files were still `src/graphics/program-lib/chunks/particle_cpu.vert` and `src/graphics/program-lib/chunks/particle_init.vert`) — run `git show` on any of them.
Change coupling: skybox.js ↔ sky-mesh.js src/scene/shader-lib/glsl/chunks/skybox/frag/skybox.js:1— `src/scene/shader-lib/glsl/chunks/skybox/frag/skybox.js` and `src/scene/skybox/sky-mesh.js` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `c4e2dba6` fix: Restore skydome depth of field with scene-pass depth (#9391); `05e59b4c` Mesh-based Skydome can write depth during prepass, to be comparible w…; `08eeea61` Adjusted syntax of variables the preprocessor uses for injection (#7386) (at that commit the file was still `src/scene/shader-lib/chunks/skybox/frag/skybox.js`) — run `git show` on any of them.
Change coupling: gsplat-work-buffer-render-pass.js ↔ gsplatCopyToWorkbuffer.js src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js:1— `src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js` and `src/scene/shader-lib/glsl/chunks/gsplat/frag/gsplatCopyToWorkbuffer.js` change together 62% of the time (13 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `2bd53d84` fix: Correct gsplat spherical harmonics with orthographic cameras (#9…; `44cfb26a` Source geometry from work buffer for SOG spherical harmonics updates …; `3ae33b7a` Make frustum culling always-on and remove dead pcNodeIndex pipeline (… — run `git show` on any of them.
Change coupling: webgpu-bind-group-format.js ↔ webgpu-bind-group.js src/platform/graphics/webgpu/webgpu-bind-group-format.js:1— `src/platform/graphics/webgpu/webgpu-bind-group-format.js` and `src/platform/graphics/webgpu/webgpu-bind-group.js` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `c197fafd` Restore WebGPU rendering resources after device loss (#9355); `76a7820e` Renamed internal ‘descr’ symbols to ‘desc’ for consistency (#6833); `e97f3ff3` Renamed BindBufferFormat to BindUniformBufferFormat (#6222) — run `git show` on any of them.
Change coupling: blend-state.js ↔ webgpu-graphics-device.js src/platform/graphics/blend-state.js:1— `src/platform/graphics/blend-state.js` and `src/platform/graphics/webgpu/webgpu-graphics-device.js` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `4d15fc1c` Add independent blending for multiple render targets (#9140); `bcb15734` Add dual-source blending support (#9096); `583b8fe5` Remove final WebGL1 extensions and simplify code that used them (#6336) — run `git show` on any of them.
Change coupling: shadow-renderer-directional.js ↔ shadow-renderer-local.js src/scene/renderer/shadow-renderer-directional.js:1— `src/scene/renderer/shadow-renderer-directional.js` and `src/scene/renderer/shadow-renderer-local.js` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `9cdb31ca` Move frustum compute into Camera.updateFrustum (#8981); `a5b00dd5` Address PCSS softness (#5483); `dcb5a012` Small internal refator to RenderPass to allow simpler override implem… — run `git show` on any of them.
Change coupling: gsplat-work-buffer-render-pass.js ↔ gsplatCopyToWorkbuffer.js src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js:1— `src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js` and `src/scene/shader-lib/wgsl/chunks/gsplat/frag/gsplatCopyToWorkbuffer.js` change together 57% of the time (13 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `2bd53d84` fix: Correct gsplat spherical harmonics with orthographic cameras (#9…; `44cfb26a` Source geometry from work buffer for SOG spherical harmonics updates …; `3ae33b7a` Make frustum culling always-on and remove dead pcNodeIndex pipeline (… — run `git show` on any of them.
Change coupling: anim-state.js ↔ component.js src/framework/anim/controller/anim-state.js:1— `src/framework/anim/controller/anim-state.js` and `src/framework/components/anim/component.js` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `cfbeda96` Tweaks to Anim API docs (#7520); `d2418b92` [Anim Component] Fix for resetting parameters (#5392); `a82e7f1f` [Anim Component] Support empty AnimTracks (#5112) — run `git show` on any of them.
Change coupling: gsplat-info.js ↔ gsplat-unified-sort-worker.js src/scene/gsplat-unified/gsplat-info.js:1— `src/scene/gsplat-unified/gsplat-info.js` and `src/scene/gsplat-unified/gsplat-unified-sort-worker.js` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `78d557c1` Per-node block allocation and partial work buffer updates for GSplats…; `54218043` refactor: Switch gsplat work buffer from row-aligned to pixel-offset …; `3314f93a` Skip padding pixels during GSplat sorting and rendering (#8471) — run `git show` on any of them.
Change coupling: gsplat-params.js ↔ gsplat-placement.js src/scene/gsplat-unified/gsplat-params.js:1— `src/scene/gsplat-unified/gsplat-params.js` and `src/scene/gsplat-unified/gsplat-placement.js` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `72626a18` Make gsplat LOD distance-only, with target or limit splat budgets (#9…; `a939ca99` Add a LOD mode and a per-splat detail falloff for streamed GSplats (#…; `c67179f0` refactor(gsplat)!: move lodRangeMin/lodRangeMax to GSplatComponent (#… — run `git show` on any of them.
Change coupling: gsplat.js ↔ gsplatCommon.js src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplat.js:1— `src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplat.js` and `src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplatCommon.js` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `e232ddf2` feat: Respect gsplat alphaCull on CPU raster and compute paths (#8687); `d5963f25` Remove deprecated gsplatCustomizeVS shader chunk (#8422); `fd561dd4` Add gsplatModifyVS shader customization chunk for gaussian splats (#8… — run `git show` on any of them.
Change coupling: sog-bundle.js ↔ sog.js src/framework/parsers/sog-bundle.js:1— `src/framework/parsers/sog-bundle.js` and `src/framework/parsers/sog.js` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `2ffa84bf` Recover SOG streaming across WebGL context loss (#9350); `ddfd9bbd` Fix SOG parsers throwing when a load completes after app teardown (#9…; `6e221b3d` Fix sog streaming re-load returning destroyed textures from loader ca… — run `git show` on any of them.
Change coupling: gles3.js ↔ webgpu.js src/platform/graphics/shader-chunks/frag/gles3.js:1— `src/platform/graphics/shader-chunks/frag/gles3.js` and `src/platform/graphics/shader-chunks/frag/webgpu.js` change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `bcb15734` Add dual-source blending support (#9096); `819803bb` Update to the way we strip unused MRT outputs (#7395); `f8468672` Deprecate WebGL1 based texture sampling names with _EXT (#7221) — run `git show` on any of them.
Change coupling: lights-buffer.js ↔ clusteredLight.js src/scene/lighting/lights-buffer.js:1— `src/scene/lighting/lights-buffer.js` and `src/scene/shader-lib/glsl/chunks/lit/frag/clusteredLight.js` change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `0f4c6037` Fix spotlight rendering issues with small cone angles in clustered li…; `1a58b59d` [Fix] Fixed issue where clustered light color is over half-float rang… (at that commit the file was still `src/scene/shader-lib/chunks/lit/frag/clusteredLight.js`); `575f3348` Clustered lighting optimisations - removed WebGL1 compatibility solut… (at that commit the file was still `src/scene/shader-lib/chunks/lit/frag/clusteredLight.js`) — run `git show` on any of them.
Change coupling: frame-pass-bloom.js ↔ index.js src/extras/effects/bloom/passes/frame-pass-bloom.js:1— `src/extras/effects/bloom/passes/frame-pass-bloom.js` and `src/extras/index.js` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `0422b32c` Extract FramePass base class from RenderPass (#8523) (at that commit the file was still `src/extras/render-passes/frame-pass-bloom.js`); `9efc7d01` CameraFrame API in the engine (#7129) (at that commit the file was still `src/extras/render-passes/render-pass-bloom.js`); `9868aa6c` RenderPass based SSAO (#6657) (at that commit the file was still `src/extras/render-passes/render-pass-bloom.js`) — run `git show` on any of them.
Change coupling: gsplat-params.js ↔ gsplat-quad-renderer.js src/scene/gsplat-unified/gsplat-params.js:1— `src/scene/gsplat-unified/gsplat-params.js` and `src/scene/gsplat-unified/gsplat-quad-renderer.js` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `512c92cf` Add scene.gsplat.useTonemap to opt splats out of tonemapping and expo…; `c50c292d` refactor: move material preparation behind update version (#9102); `1a1b2c49` Add fog support for Gaussian splat rendering (#8583) — run `git show` on any of them.
Change coupling: webgpu-compute.js ↔ webgpu-shader.js src/platform/graphics/webgpu/webgpu-compute.js:1— `src/platform/graphics/webgpu/webgpu-compute.js` and `src/platform/graphics/webgpu/webgpu-shader.js` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `94604f35` Add Compute#setupDispatchThreads to dispatch for a number of threads …; `d78ee4b8` feat(webgpu): automatic bind-group reflection for compute shaders (#8…; `464ffdbf` Compute shader JSDocs + small API changes (#6258) — run `git show` on any of them.
Low cohesion: CollisionComponentSystem (LCOM4 10) src/framework/components/collision/system.js:600— CollisionComponentSystem's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: GraphNode (LCOM4 7) src/scene/graph-node.js:122— GraphNode's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ElementComponent (LCOM4 6) src/framework/components/element/component.js:100— ElementComponent's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ScreenComponentSystem (LCOM4 6) src/framework/components/screen/system.js:31— ScreenComponentSystem's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Layer (LCOM4 6) src/scene/layer.js:87— Layer's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Renderer (LCOM4 5) src/scene/renderer/renderer.js:159— Renderer's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: JointComponentSystem (LCOM4 5) src/framework/components/joint/system.js:31— JointComponentSystem's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: RotateGizmo (LCOM4 5) src/extras/gizmo/transform/rotate-gizmo.js:52— RotateGizmo's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ShareDialog (LCOM4 4) examples/src/app/components/ShareDialog.mjs:54— ShareDialog's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: GSplatCompressedData (LCOM4 4) src/scene/gsplat/gsplat-compressed-data.js:96— GSplatCompressedData's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Scene (LCOM4 4) src/scene/scene.js:57— Scene's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CollisionComponent (LCOM4 4) src/framework/components/collision/component.js:65— CollisionComponent's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ImageElement (LCOM4 4) src/framework/components/element/image-element.js:280— ImageElement's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: WebglTexture (LCOM4 4) src/platform/graphics/webgl/webgl-texture.js:62— WebglTexture's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: TranslateGizmo (LCOM4 4) src/extras/gizmo/transform/translate-gizmo.js:53— TranslateGizmo's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
No assertions: fires a drag:end event when dragging ends via touchend and stops firing drag:move events test/framework/components/element/element-drag-helper.test.mjs:211— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: fires a drag:end event when dragging ends via touchcancel and stops firing drag:move events test/framework/components/element/element-drag-helper.test.mjs:215— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: includes ancestral rotation in coordinate conversion test/framework/components/element/element-drag-helper.test.mjs:265— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: includes ancestral scale in coordinate conversion test/framework/components/element/element-drag-helper.test.mjs:276— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: includes camera rotation in coordinate conversion test/framework/components/element/element-drag-helper.test.mjs:285— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: includes screen scale in coordinate conversion and disables perspective when using screen space test/framework/components/element/element-drag-helper.test.mjs:294— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: supports an element that is a direct child of a screen space screen test/framework/components/element/element-drag-helper.test.mjs:308— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: allows dragging to be constrained to the X axis test/framework/components/element/element-drag-helper.test.mjs:323— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: allows dragging to be constrained to the Y axis test/framework/components/element/element-drag-helper.test.mjs:330— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: takes device pixel ratio into account test/framework/components/element/element-drag-helper.test.mjs:337— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renders, alone, with TAA, with multisampling and with its debug view test/extras/render-passes/auto-exposure-effect.test.mjs:118— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renders with TAA, alone and upscaling, and with the sharpening of the HDR scene test/extras/render-passes/frame-pass-camera-frame.test.mjs:206— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renders, alone and with TAA and multisampling test/extras/render-passes/smaa-effect.test.mjs:218— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
Repeated repair: examples/src/examples/gaussian-splatting/depth-of-field.example.mjs examples/src/examples/gaussian-splatting/depth-of-field.example.mjs:171— examples/src/examples/gaussian-splatting/depth-of-field.example.mjs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is depth-of-field.example.onFrameReady at line 171), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Type check the examples and resolve multi-file example imports (#9812)”; “fix(examples): Apply settings once the initial values are set (#9640)”; “fix(examples): Restore the depth prepass in the gaussian splat depth-of-field example (#9639)”; “fix: Render gaussian splat crop and depth-of-field examples without MSAA (#9634)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- examples/src/examples/gaussian-splatting/depth-of-field.example.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: examples/src/examples/gizmos/transform-rotate.example.mjs examples/src/examples/gizmos/transform-rotate.example.mjs:172— examples/src/examples/gizmos/transform-rotate.example.mjs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is transform-rotate.example.data.on("*:set") at line 172), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Type check the examples and resolve multi-file example imports (#9812)”; “fix: Stop orthographic example views clipping at the camera near plane (#9840)”; “fix: Replace the Arial and Courier fonts of the examples and tests with Roboto (#9577)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- examples/src/examples/gizmos/transform-rotate.example.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: examples/src/examples/gizmos/transform-scale.example.mjs examples/src/examples/gizmos/transform-scale.example.mjs:177— examples/src/examples/gizmos/transform-scale.example.mjs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is transform-scale.example.data.on("*:set") at line 177), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Type check the examples and resolve multi-file example imports (#9812)”; “fix: Stop orthographic example views clipping at the camera near plane (#9840)”; “fix: Replace the Arial and Courier fonts of the examples and tests with Roboto (#9577)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- examples/src/examples/gizmos/transform-scale.example.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: examples/src/examples/gizmos/transform-translate.example.mjs examples/src/examples/gizmos/transform-translate.example.mjs:177— examples/src/examples/gizmos/transform-translate.example.mjs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is transform-translate.example.data.on("*:set") at line 177), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Type check the examples and resolve multi-file example imports (#9812)”; “fix: Stop orthographic example views clipping at the camera near plane (#9840)”; “fix: Replace the Arial and Courier fonts of the examples and tests with Roboto (#9577)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- examples/src/examples/gizmos/transform-translate.example.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/extras/gizmo/gizmo.js src/extras/gizmo/gizmo.js:713— src/extras/gizmo/gizmo.js changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is Gizmo._getSelection at line 713), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Gizmo fixes for editor integration: disabled components, centered icons and flat boxes (#9817)”; “fix: Harden gizmos: shared layers, layer setter, enabled state, theme hover, multi-touch, arc mesh leak, uniform plane scaling and picking order (#9800)”; “fix: Gizmo picking, stuck drags, scale snapping, parentless local translate and ViewCube colorNeg (#9799)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/extras/gizmo/gizmo.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: examples/src/examples/graphics/outlines-colored.example.mjs examples/src/examples/graphics/outlines-colored.example.mjs:204— examples/src/examples/graphics/outlines-colored.example.mjs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is outlines-colored.example.applySettings at line 204), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Type check the examples and resolve multi-file example imports (#9812)”; “fix(examples): Apply settings once the initial values are set (#9640)”; “fix: OutlineRenderer material cleanup and frameUpdate listener leak (#9589)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- examples/src/examples/graphics/outlines-colored.example.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: examples/src/examples/graphics/area-picker.example.mjs examples/src/examples/graphics/area-picker.example.mjs:275— examples/src/examples/graphics/area-picker.example.mjs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is area-picker.example.app.on("update") at line 275), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Type check the examples and resolve multi-file example imports (#9812)”; “fix: Stop orthographic example views clipping at the camera near plane (#9840)”; “fix: Apply area-picker example material changes via update() (#9497)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- examples/src/examples/graphics/area-picker.example.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js:116— src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is GSplatWorkBufferRenderPass.update at line 116), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Distinct gsplat LOD debug colors and billions LOD falloff (#9673)”; “fix: Correct gsplat spherical harmonics with orthographic cameras (#9531)”; “fix: avoid retaining gsplat work buffer shaders (#9322)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/platform/graphics/graphics-device-create.js src/platform/graphics/graphics-device-create.js:93— src/platform/graphics/graphics-device-create.js changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is graphics-device-create.createGraphicsDevice at line 93), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix WebGPU creation for cross-document canvases (#9814)”; “fix: Make createGraphicsDevice reject instead of hanging when no device can be created (#9603)”; “fix: Add alpha option to createGraphicsDevice typings (#9317)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/platform/graphics/graphics-device-create.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: scripts/esm/xr/xr-controllers.mjs scripts/esm/xr/xr-controllers.mjs:386— scripts/esm/xr/xr-controllers.mjs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is XrControllers.update at line 386), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “XrNavigation and XrControllers fixes found on Apple Vision Pro (#9750)”; “fix: Hide XrControllers models while their pose is not tracked (#9635)”; “fix: Keep XrControllers models loaded while input sources share them (#9631)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- scripts/esm/xr/xr-controllers.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: examples/src/examples/gizmos/icon.example.mjs examples/src/examples/gizmos/icon.example.mjs:171— examples/src/examples/gizmos/icon.example.mjs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is icon.example.data.on("*:set") at line 171), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Type check the examples and resolve multi-file example imports (#9812)”; “fix: Stop orthographic example views clipping at the camera near plane (#9840)”; “fix: Gizmo fixes for editor integration: disabled components, centered icons and flat boxes (#9817)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- examples/src/examples/gizmos/icon.example.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/scene/graphics/prefix-sum-kernel.js src/scene/graphics/prefix-sum-kernel.js:230— src/scene/graphics/prefix-sum-kernel.js changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is PrefixSumKernel.resize at line 230), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Correct ComputeRadixSort scan growth and destructiveKeys switching (#9759)”; “fix: Dispatch each Compute instance at most once per frame (#9690)”; “Fix WebGPU recovery for compute, readback and generated data (#9358)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 17:29:54 +00:00' --until='2026-10-29 17:29:54 +00:00' --full-history --no-merges -- src/scene/graphics/prefix-sum-kernel.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FunctionTooLong: layout-calculator.createCalculator src/framework/components/layout-group/layout-calculator.js:57— FunctionTooLong — createCalculator runs 313 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 213 over it, 3.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: basis-worker.BasisWorker src/framework/handlers/basis-worker.js:2— FunctionTooLong — BasisWorker runs 292 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 192 over it, 2.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: gsplat-sort-worker.SortWorker src/scene/gsplat/gsplat-sort-worker.js:5— FunctionTooLong — SortWorker runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: draco-worker.DracoWorker src/framework/parsers/draco-worker.js:4— FunctionTooLong — DracoWorker runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: gsplat-unified-sort-worker.UnifiedSortWorker src/scene/gsplat-unified/gsplat-unified-sort-worker.js:4— FunctionTooLong — UnifiedSortWorker runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: glb-parser.createAnimation src/framework/parsers/glb-parser.js:673— FunctionTooLong — createAnimation runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: standard-material._defineMaterialProps src/scene/materials/standard-material.js:2342— FunctionTooLong — _defineMaterialProps runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: vat-converter.sampleAnimations scripts/esm/vat/vat-converter.mjs:180— FunctionTooLong — sampleAnimations runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Swallowed exception (empty catch) src/platform/graphics/webgpu/webgpu-xr-bridge.js:95— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/platform/graphics/webgpu/webgpu-xr-bridge.js:227— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/framework/xr/xr-anchors.js:406— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) src/framework/handlers/basis.js:43— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/core/wasm-module.js:26— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) scripts/spine/playcanvas-spine.4.3.js:167— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) scripts/esm/xr/xr-controllers.mjs:138— `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Sync-over-async blocking examples/utils/thumbnails.mjs:173— `fs.readFileSync` in `takeThumbnails` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking examples/utils/thumbnails.mjs:186— `fs.unlinkSync` in `takeThumbnails` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking examples/utils/thumbnails.mjs:207— `fs.rmSync` in `takeScreenshots` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking examples/utils/thumbnails.mjs:209— `fs.existsSync` in `takeScreenshots` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking examples/utils/thumbnails.mjs:210— `fs.mkdirSync` in `takeScreenshots` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking examples/utils/thumbnails.mjs:222— `fs.existsSync` in `takeScreenshots` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
IC1 · Incompleteness & stubs· Empty method body · ×5
Empty method body — does nothing with its inputs src/framework/components/element/image-element.js:372— `_onResolutionChange` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs src/framework/components/element/image-element.js:756— `_onTextureChange` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs src/framework/components/element/image-element.js:760— `_onTextureRemove` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs src/framework/components/element/text-element.js:1544— `_onFontRemove` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs src/platform/graphics/null/null-texture.js:10— `propertyChanged` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Change-coupling hub: gsplatCommon.js → gsplat.js, gsplatCommon.js, gsplat.js src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplatCommon.js— `src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplatCommon.js` changes together with 3 other files — `src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplat.js`, `src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplatCommon.js`, `src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplat.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: gsplat-manager.js → gsplat-info.js, gsplat-interval-compaction.js, gsplat-octree-instance.js, gsplat-projector.js, gsplat-unified-sort-worker.js, gsplat-work-buffer.js, compute-gsplat-projector.js src/scene/gsplat-unified/gsplat-manager.js— `src/scene/gsplat-unified/gsplat-manager.js` changes together with 7 other files — `src/scene/gsplat-unified/gsplat-info.js`, `src/scene/gsplat-unified/gsplat-interval-compaction.js`, `src/scene/gsplat-unified/gsplat-octree-instance.js`, `src/scene/gsplat-unified/gsplat-projector.js`, `src/scene/gsplat-unified/gsplat-unified-sort-worker.js`, `src/scene/gsplat-unified/gsplat-work-buffer.js`, `src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-projector.js` — none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 7.
Change-coupling hub: standard-material-options-builder.js → standard-material-options.js, standard-material-parameters.js, lit-shader-options.js src/scene/materials/standard-material-options-builder.js— `src/scene/materials/standard-material-options-builder.js` changes together with 3 other files — `src/scene/materials/standard-material-options.js`, `src/scene/materials/standard-material-parameters.js`, `src/scene/shader-lib/programs/lit-shader-options.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: forward-renderer.js → gpu-updater.js, shadow-renderer-directional.js, shadow-renderer-local.js, shadow-renderer.js src/scene/renderer/forward-renderer.js— `src/scene/renderer/forward-renderer.js` changes together with 4 other files — `src/scene/particle-system/gpu-updater.js`, `src/scene/renderer/shadow-renderer-directional.js`, `src/scene/renderer/shadow-renderer-local.js`, `src/scene/renderer/shadow-renderer.js` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
X2 · Cancellation propagation· Async function without AbortSignal · ×4
Async function without AbortSignal: load src/framework/parsers/ply.js:591— `load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: downloadArrayBuffer src/framework/parsers/sog-bundle.js:102— `downloadArrayBuffer` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: _loadProfile scripts/esm/xr/xr-controllers.mjs:272— `_loadProfile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: load scripts/esm/vat/vat-characters.mjs:309— `load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
basis-worker.BasisWorker::transcodeBasis (cognitive 21) src/framework/handlers/basis-worker.js:307— basis-worker.BasisWorker::transcodeBasis has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (basis-worker.BasisWorker::chooseTargetFormat, basis-worker.BasisWorker::transcodeKTX2) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
basis-worker.BasisWorker::transcodeKTX2 (cognitive 19) src/framework/handlers/basis-worker.js:208— basis-worker.BasisWorker::transcodeKTX2 has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (basis-worker.BasisWorker::chooseTargetFormat, basis-worker.BasisWorker::transcodeBasis) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
basis-worker.BasisWorker::chooseTargetFormat (cognitive 17) src/framework/handlers/basis-worker.js:127— basis-worker.BasisWorker::chooseTargetFormat has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (basis-worker.BasisWorker::transcodeKTX2, basis-worker.BasisWorker::transcodeBasis) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
basis-worker.BasisWorker::transcodeBasis (cyclomatic 17) src/framework/handlers/basis-worker.js:307— basis-worker.BasisWorker::transcodeBasis has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (basis-worker.BasisWorker::transcodeKTX2) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
basis-worker.BasisWorker::transcodeKTX2 (cyclomatic 16) src/framework/handlers/basis-worker.js:208— basis-worker.BasisWorker::transcodeKTX2 has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: one other method here (basis-worker.BasisWorker::transcodeBasis) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
constructor (cyclomatic 16) src/platform/graphics/transform-feedback.js:124— constructor has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
constructor (cyclomatic 16) src/platform/graphics/vertex-format.js:139— constructor has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Skipped test: assets not in asset registry get loaded after they are added to the registry test/framework/i18n/i18n.test.mjs:592— Skipped — switched off by it.skip
Skipped test: assets in asset registry get loaded when passed to i18n test/framework/i18n/i18n.test.mjs:609— Skipped — switched off by it.skip
_drag (cognitive 21) src/extras/gizmo/transform/translate-gizmo.js:486— _drag has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (11 pts), if/else 2 (6 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_drag (cognitive 21) src/extras/gizmo/transform/scale-gizmo.js:502— _drag has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (11 pts), if/else 2 (6 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gsplat-unified-sort-worker.UnifiedSortWorker::computeEffectiveDistanceRangeLinear (cognitive 18) src/scene/gsplat-unified/gsplat-unified-sort-worker.js:180— gsplat-unified-sort-worker.UnifiedSortWorker::computeEffectiveDistanceRangeLinear has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 3 (5 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (gsplat-unified-sort-worker.UnifiedSortWorker::computeEffectiveDistanceRangeRadial) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
gsplat-unified-sort-worker.UnifiedSortWorker::computeEffectiveDistanceRangeRadial (cognitive 16) src/scene/gsplat-unified/gsplat-unified-sort-worker.js:222— gsplat-unified-sort-worker.UnifiedSortWorker::computeEffectiveDistanceRangeRadial has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (gsplat-unified-sort-worker.UnifiedSortWorker::computeEffectiveDistanceRangeLinear) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
constructor (cognitive 16) src/extras/gizmo/handle/handle-gizmo.js:288— constructor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 5). None of this is in the body itself: all 16 points belong to 4 function literals inside it that branch (lines 316, 293, 338, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
constructor (cognitive 16) src/scene/gsplat-unified/gsplat-octree.js:173— constructor has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 4, if/else 3 (4 pts), loops 2 (nesting depth added 4). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 200, 180). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
IC1 · Incompleteness & stubs· Guard cannot change the result · ×2
Guard cannot change the result — returns what the code already falls through to src/extras/gizmo/transform/transform-gizmo.js:805— The guard above `return point;` also returns `point`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
Guard cannot change the result — returns what the code already falls through to src/scene/gsplat-unified/gsplat-hybrid-renderer.js:987— The guard above `return false;` also returns `false`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
R10 · Code Duplication· Duplicated block with local edits (53 matched lines × 2 locations) · ×2
Duplicated block with local edits (53 matched lines × 2 locations) src/framework/components/element/image-element.js:1042— src/framework/components/element/image-element.js:1042 · src/framework/components/element/image-element.js:1204 — the two spans are one implementation copied and then locally edited — 324 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (53 matched lines × 2 locations) src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:452— src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:452 · src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:574 — the two spans are one implementation copied and then locally edited — 470 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (45 matched lines × 2 locations) · ×2
Duplicated block with local edits (45 matched lines × 2 locations) src/scene/gsplat-unified/gsplat-interval-compaction.js:164— src/scene/gsplat-unified/gsplat-interval-compaction.js:164 · src/scene/gsplat-unified/gsplat-projector.js:234 — the two spans are one implementation copied and then locally edited — 265 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (45 matched lines × 2 locations) src/scene/materials/standard-material.js:988— src/scene/materials/standard-material.js:988 · src/scene/materials/standard-material.js:1658 — the two spans are one implementation copied and then locally edited — 256 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (43 lines × 2 locations) scripts/posteffects/posteffect-horizontaltiltshift.js:42— scripts/posteffects/posteffect-horizontaltiltshift.js:42 · scripts/posteffects/posteffect-verticaltiltshift.js:42 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (43 lines × 2 locations) src/scene/shader-lib/glsl/collections/particle-chunks-glsl.js:43— src/scene/shader-lib/glsl/collections/particle-chunks-glsl.js:43 · src/scene/shader-lib/wgsl/collections/particle-chunks-wgsl.js:43 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Dead file (~10 LoC) examples/templates/controls.jsx— no import path from any entry point (146 application, 12 tooling, 334 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~10 LoC) src/scene/shader-lib/glsl/chunks/lit/vert/viewNormal.js— no import path from any entry point (146 application, 12 tooling, 334 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×2
Untrusted text written into markup unescaped src/extras/gizmo/overlay/readout.js:61— `html` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped src/framework/font/canvas-font.js:474— `text` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
constructor (cyclomatic 94) src/platform/graphics/render-target.js:388— constructor has cyclomatic complexity 94 (threshold 15). Of this number, 74 points are the body's own statements and 20 belong to 8 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextElement._updateMeshes (cyclomatic 90) src/framework/components/element/text-element.js:864— TextElement._updateMeshes has cyclomatic complexity 90 (threshold 15). Of this number, 84 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ElementComponentSystem.initializeComponentData (cyclomatic 85) src/framework/components/element/system.js:107— ElementComponentSystem.initializeComponentData has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebglTexture.upload (cyclomatic 80) src/platform/graphics/webgl/webgl-texture.js:481— WebglTexture.upload has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
layout-calculator.createCalculator (cyclomatic 72) src/framework/components/layout-group/layout-calculator.js:57— layout-calculator.createCalculator has cyclomatic complexity 72 (threshold 15). Most of this is not in the body itself: 1 of the 72 points is its own statement and the rest belongs to 19 function items inside it that branch (reverseLinesIfRequired, calculateSizesOnAxisB, splitLines, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
GltfExporter.writeStandardMaterial (cyclomatic 60) src/extras/exporters/gltf-exporter.js:491— GltfExporter.writeStandardMaterial has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextElement._updateText (cyclomatic 58) src/framework/components/element/text-element.js:376— TextElement._updateText has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShadowRenderer.cullShadowCastersOmni (cyclomatic 58) src/scene/renderer/shadow-renderer.js:302— ShadowRenderer.cullShadowCastersOmni has cyclomatic complexity 58 (threshold 15). Of this number, 55 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_validateCopy (cyclomatic 57) src/platform/graphics/texture.js:1507— _validateCopy has cyclomatic complexity 57 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
script-attributes.rawToValue (cyclomatic 56) src/framework/script/script-attributes.js:20— script-attributes.rawToValue has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
constructor (cyclomatic 49) src/platform/graphics/webgl/webgl-graphics-device.js:230— constructor has cyclomatic complexity 49 (threshold 15). Of this number, 19 points are the body's own statements and 30 belong to 30 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
UnifiedSortWorker (cyclomatic 46) src/scene/gsplat-unified/gsplat-unified-sort-worker.js:4— UnifiedSortWorker has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 1 of the 46 points is its own statement and the rest belongs to 12 function items inside it that branch (computeEffectiveDistanceRangeLinear, computeEffectiveDistanceRangeRadial, buildIndexMap, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Preprocessor._preprocess (cyclomatic 45) REDACTED:232— Preprocessor._preprocess has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParticleCPUUpdater.update (cyclomatic 45) src/scene/particle-system/cpu-updater.js:98— ParticleCPUUpdater.update has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
draw (cyclomatic 44) src/platform/graphics/webgl/webgl-graphics-device.js:2128— draw has cyclomatic complexity 44 (threshold 15). Of this number, 40 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StandardMaterialValidator.validate (cyclomatic 43) src/scene/materials/standard-material-validator.js:72— StandardMaterialValidator.validate has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
constructor (cyclomatic 43) src/platform/graphics/texture.js:295— constructor has cyclomatic complexity 43 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ShaderGeneratorStandard.createShaderDefinition (cyclomatic 42) src/scene/shader-lib/programs/standard.js:355— ShaderGeneratorStandard.createShaderDefinition has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RigidBodyComponentSystem.onContactPair (cyclomatic 40) src/framework/components/rigid-body/system.js:882— RigidBodyComponentSystem.onContactPair has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MiniStats.rebuildGeometry (cyclomatic 40) src/extras/mini-stats/mini-stats.js:792— MiniStats.rebuildGeometry has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ForwardRenderer.buildFrameGraph (cyclomatic 37) src/scene/renderer/forward-renderer.js:665— ForwardRenderer.buildFrameGraph has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
start (cyclomatic 37) src/framework/xr/xr-manager.js:537— start has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
log (cyclomatic 36) src/platform/graphics/render-pass.js:779— log has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GSplatBudgetBalancer.balance (cyclomatic 35) src/scene/gsplat-unified/gsplat-budget-balancer.js:85— GSplatBudgetBalancer.balance has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
gsplat-sort-worker.SortWorker::update (cyclomatic 34) src/scene/gsplat/gsplat-sort-worker.js:46— gsplat-sort-worker.SortWorker::update has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
BatchManager.create (cyclomatic 34) src/scene/batching/batch-manager.js:686— BatchManager.create has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextureRenderer.draw (cyclomatic 34) src/extras/renderers/texture-renderer.js:228— TextureRenderer.draw has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Texture.setSource (cyclomatic 33) src/platform/graphics/texture.js:1262— Texture.setSource has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConeBaseGeometry.constructor (cyclomatic 33) src/scene/geometry/cone-base-geometry.js:14— ConeBaseGeometry.constructor has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lightmapper.bakeInternal (cyclomatic 33) src/framework/lightmapper/lightmapper.js:932— Lightmapper.bakeInternal has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
glb-parser.createAnimation (cyclomatic 33) src/framework/parsers/glb-parser.js:673— glb-parser.createAnimation has cyclomatic complexity 33 (threshold 15). Of this number, 24 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_rebuildElements (cyclomatic 32) src/extras/effects/lens-flare/lens-flare-effect.js:285— _rebuildElements has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
update (cyclomatic 32) src/framework/handlers/cubemap.js:104— update has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Mesh._initBoneAabbs (cyclomatic 31) src/scene/mesh.js:472— Mesh._initBoneAabbs has cyclomatic complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ScriptComponent.create (cyclomatic 31) src/framework/components/script/component.js:769— ScriptComponent.create has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AnimationComponent.onAssetChanged (cyclomatic 31) src/framework/components/animation/component.js:580— AnimationComponent.onAssetChanged has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
renderForwardInternal (cyclomatic 31) src/scene/renderer/forward-renderer.js:285— renderForwardInternal has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XrManipulation.update (cyclomatic 30) scripts/esm/xr/xr-manipulation.mjs:552— XrManipulation.update has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BatchManager.prepare (cyclomatic 30) src/scene/batching/batch-manager.js:483— BatchManager.prepare has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebgpuTexture.uploadData (cyclomatic 30) src/platform/graphics/webgpu/webgpu-texture.js:386— WebgpuTexture.uploadData has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
render-physics.RenderPhysics.postUpdate (cyclomatic 29) scripts/physics/render-physics.js:71— render-physics.RenderPhysics.postUpdate has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 81, 205). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ParticleEmitter.rebuild (cyclomatic 29) src/scene/particle-system/particle-emitter.js:553— ParticleEmitter.rebuild has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DdsParser.open (cyclomatic 29) src/framework/parsers/texture/dds.js:29— DdsParser.open has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AssetRegistry.load (cyclomatic 29) src/framework/asset/asset-registry.js:462— AssetRegistry.load has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 3 function items inside it that branch (_opened, _loaded, _fireLoad). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
LensFlareEffect.frameUpdate (cyclomatic 29) src/extras/effects/lens-flare/lens-flare-effect.js:381— LensFlareEffect.frameUpdate has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
copyRenderTarget (cyclomatic 29) src/platform/graphics/webgpu/webgpu-graphics-device.js:2121— copyRenderTarget has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
renderForwardLayer (cyclomatic 29) src/scene/renderer/forward-renderer.js:489— renderForwardLayer has cyclomatic complexity 29 (threshold 15). Of this number, 22 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
init (cyclomatic 29) src/platform/graphics/webgl/webgl-render-target.js:169— init has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reprojectTexture (cyclomatic 29) src/scene/graphics/reproject-texture.js:391— reprojectTexture has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GSplatWorld.update (cyclomatic 28) src/scene/gsplat-unified/gsplat-world.js:452— GSplatWorld.update has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GSplatWorld._updateWorldState (cyclomatic 28) src/scene/gsplat-unified/gsplat-world.js:599— GSplatWorld._updateWorldState has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
setupForRenderPass (cyclomatic 28) src/platform/graphics/webgpu/webgpu-render-target.js:604— setupForRenderPass has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
glb-parser.createImages (cyclomatic 27) src/framework/parsers/glb-parser.js:1361— glb-parser.createImages has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 1384, a function literal at line 1421, a function literal at line 1481, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
TextureAtlasHandler.patch (cyclomatic 27) src/framework/handlers/texture-atlas.js:110— TextureAtlasHandler.patch has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
draw (cyclomatic 27) src/platform/graphics/webgpu/webgpu-graphics-device.js:1368— draw has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Http.request (cyclomatic 26) src/platform/net/http.js:374— Http.request has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ResourceLoader.load (cyclomatic 26) src/framework/handlers/loader.js:125— ResourceLoader.load has cyclomatic complexity 26 (threshold 15). Of this number, 16 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LightGizmo._drawArea (cyclomatic 26) src/extras/gizmo/handle/light-gizmo.js:178— LightGizmo._drawArea has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_setupLight (cyclomatic 26) src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:242— _setupLight has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Water._frameUpdate (cyclomatic 25) scripts/esm/water.mjs:1660— Water._frameUpdate has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GSplatDirector.update (cyclomatic 25) src/scene/gsplat-unified/gsplat-director.js:349— GSplatDirector.update has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StandardMaterialOptionsBuilder._updateMaterialOptions (cyclomatic 25) src/scene/materials/standard-material-options-builder.js:220— StandardMaterialOptionsBuilder._updateMaterialOptions has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
initFromGpuDevice (cyclomatic 25) src/platform/graphics/webgpu/webgpu-graphics-device.js:778— initFromGpuDevice has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ObjModelParser.parse (cyclomatic 24) scripts/esm/parsers/obj-model.mjs:48— ObjModelParser.parse has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Preprocessor.processParentheses (cyclomatic 24) REDACTED:595— Preprocessor.processParentheses has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LayerComposition._update (cyclomatic 24) src/scene/composition/layer-composition.js:150— LayerComposition._update has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GSplatOctreeInstance.applyLodChanges (cyclomatic 24) src/scene/gsplat-unified/gsplat-octree-instance.js:635— GSplatOctreeInstance.applyLodChanges has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ElementComponentSystem.getImageElementMaterial (cyclomatic 24) src/framework/components/element/system.js:452— ElementComponentSystem.getImageElementMaterial has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebglGraphicsDevice.copyRenderTarget (cyclomatic 24) src/platform/graphics/webgl/webgl-graphics-device.js:1322— WebglGraphicsDevice.copyRenderTarget has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
glb-parser.createMaterial (cyclomatic 24) src/framework/parsers/glb-parser.js:534— glb-parser.createMaterial has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
copyTextureToTexture (cyclomatic 24) src/platform/graphics/webgl/webgl-graphics-device.js:1404— copyTextureToTexture has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XrMenu._updateRayInteraction (cyclomatic 23) scripts/esm/xr/xr-menu.mjs:1548— XrMenu._updateRayInteraction has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebglGraphicsDevice.endRenderPass (cyclomatic 23) src/platform/graphics/webgl/webgl-graphics-device.js:1624— WebglGraphicsDevice.endRenderPass has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
texture._completePartialMipmapChain (cyclomatic 23) src/framework/handlers/texture.js:101— texture._completePartialMipmapChain has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
StandardMaterialOptionsBuilder._updateEnvOptions (cyclomatic 23) src/scene/materials/standard-material-options-builder.js:304— StandardMaterialOptionsBuilder._updateEnvOptions has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
constructor (cyclomatic 23) src/extras/mini-stats/mini-stats.js:129— constructor has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 223, 203, 209, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
_draw (cyclomatic 23) src/extras/renderers/texture-renderer.js:292— _draw has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
tween.Tween.start (cyclomatic 22) scripts/animation/tween.js:191— tween.Tween.start has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (updateProperty, a function literal at line 276, a function literal at line 281, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
FrameGraph._compilePasses (cyclomatic 22) src/scene/frame-graph.js:186— FrameGraph._compilePasses has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
system.recreateShapes (cyclomatic 22) src/framework/components/collision/system.js:329— system.recreateShapes has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
khr-gaussian-splatting.createGSplatData (cyclomatic 22) src/framework/parsers/glb/extensions/khr-gaussian-splatting.js:29— khr-gaussian-splatting.createGSplatData has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XrHand.update (cyclomatic 22) src/framework/xr/xr-hand.js:151— XrHand.update has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AnimController.updateStateFromTransition (cyclomatic 22) src/framework/anim/controller/anim-controller.js:422— AnimController.updateStateFromTransition has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultAnimBinder.constructor (cyclomatic 22) src/framework/anim/binder/default-anim-binder.js:12— DefaultAnimBinder.constructor has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (findMeshInstances, a function literal at line 81, a function literal at line 118, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Skeleton.addTime (cyclomatic 22) src/scene/animation/skeleton.js:143— Skeleton.addTime has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AnimationComponent.update (cyclomatic 22) src/framework/components/animation/component.js:743— AnimationComponent.update has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webgpu-shader-processor-wgsl.getTextureDeclarationType (cyclomatic 22) REDACTED:158— webgpu-shader-processor-wgsl.getTextureDeclarationType has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
setCameraUniforms (cyclomatic 22) src/scene/renderer/renderer.js:502— setCameraUniforms has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
resolveDuplicatedEntityReferenceProperties (cyclomatic 22) src/framework/components/script/component.js:1043— resolveDuplicatedEntityReferenceProperties has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_createProjectorCompute (cyclomatic 22) src/scene/gsplat-unified/gsplat-projector.js:400— _createProjectorCompute has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 12 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
createDefinition (cyclomatic 22) src/platform/graphics/shader-definition-utils.js:88— createDefinition has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 3 function items inside it that branch (getDefines, getDefinesWgsl, normalizedOutputTypes). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
TagsCache.find (cyclomatic 21) src/core/tags-cache.js:86— TagsCache.find has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShadowRendererDirectional.cull (cyclomatic 21) src/scene/renderer/shadow-renderer-directional.js:220— ShadowRendererDirectional.cull has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ElementInput._onElementSelectEvent (cyclomatic 21) src/framework/input/element-input.js:837— ElementInput._onElementSelectEvent has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SpriteComponentSystem.initializeComponentData (cyclomatic 21) src/framework/components/sprite/system.js:152— SpriteComponentSystem.initializeComponentData has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ScriptRegistry.add (cyclomatic 21) src/framework/script/script-registry.js:107— ScriptRegistry.add has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 159, 134). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AnimController.update (cyclomatic 21) src/framework/anim/controller/anim-controller.js:609— AnimController.update has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
readTextureAsync (cyclomatic 21) src/platform/graphics/webgl/webgl-graphics-device.js:2603— readTextureAsync has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
applySettings (cyclomatic 21) src/scene/gsplat-unified/gsplat-params.js:1118— applySettings has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
GraphicsDevice.initCapsDefines (cyclomatic 20) src/platform/graphics/graphics-device.js:886— GraphicsDevice.initCapsDefines has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GSplatShadowRenderer._cullEntry (cyclomatic 20) src/scene/gsplat-unified/gsplat-shadow-renderer.js:548— GSplatShadowRenderer._cullEntry has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
khr-draco-mesh-compression.createDracoMesh (cyclomatic 20) src/framework/parsers/glb/extensions/khr-draco-mesh-compression.js:15— khr-draco-mesh-compression.createDracoMesh has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 23, 75, 20). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
basis.basisInitialize (cyclomatic 20) src/framework/handlers/basis.js:274— basis.basisInitialize has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MaterialHandler._bindAndAssignAssets (cyclomatic 20) src/framework/handlers/material.js:227— MaterialHandler._bindAndAssignAssets has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AppBase._parseApplicationProperties (cyclomatic 20) src/framework/app-base.js:874— AppBase._parseApplicationProperties has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CameraGizmo._draw (cyclomatic 20) src/extras/gizmo/handle/camera-gizmo.js:74— CameraGizmo._draw has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LightGizmo._drawSpot (cyclomatic 20) src/extras/gizmo/handle/light-gizmo.js:271— LightGizmo._drawSpot has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
init (cyclomatic 20) src/framework/app-base.js:573— init has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
shadowType (cyclomatic 20) src/scene/light.js:582— shadowType has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
EventHandler.off (cyclomatic 19) src/core/event-handler.js:168— EventHandler.off has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParticleSystemComponentSystem.initializeComponentData (cyclomatic 19) src/framework/components/particle-system/system.js:126— ParticleSystemComponentSystem.initializeComponentData has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lightmapper.collectModels (cyclomatic 19) src/framework/lightmapper/lightmapper.js:309— Lightmapper.collectModels has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
draco-worker.DracoWorker::decodeMesh (cyclomatic 19) src/framework/parsers/draco-worker.js:138— draco-worker.DracoWorker::decodeMesh has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CubemapHandler.loadAssets (cyclomatic 19) src/framework/handlers/cubemap.js:236— CubemapHandler.loadAssets has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JsonStandardMaterialParser.initialize (cyclomatic 19) src/framework/parsers/material/json-standard-material.js:71— JsonStandardMaterialParser.initialize has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HdrParser._readPixels (cyclomatic 19) src/framework/parsers/texture/hdr.js:123— HdrParser._readPixels has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AnimController._findTransition (cyclomatic 19) src/framework/anim/controller/anim-controller.js:342— AnimController._findTransition has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WebgpuBindGroup.createDescriptor (cyclomatic 19) src/platform/graphics/webgpu/webgpu-bind-group.js:74— WebgpuBindGroup.createDescriptor has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 121, 107, 163, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
startRenderPass (cyclomatic 19) src/platform/graphics/webgl/webgl-graphics-device.js:1511— startRenderPass has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
frameStart (cyclomatic 19) src/platform/graphics/graphics-device.js:1838— frameStart has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 1860, a function literal at line 1884, a function literal at line 1842, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
attachTexture (cyclomatic 19) src/extras/exporters/gltf-exporter.js:421— attachTexture has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity· get (cyclomatic 19) · ×1
get (cyclomatic 19) src/platform/graphics/webgpu/webgpu-render-pipeline.js:202— get has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
load (cyclomatic 19) src/framework/parsers/sog-bundle.js:188— load has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 12 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
build.main (cyclomatic 18) build.mjs:370— build.main has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
XrMenu._checkFingerTouch (cyclomatic 18) scripts/esm/xr/xr-menu.mjs:1333— XrMenu._checkFingerTouch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GraphicsDevice.getRenderableHdrFormat (cyclomatic 18) src/platform/graphics/graphics-device.js:1963— GraphicsDevice.getRenderableHdrFormat has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StandardMaterialMapTransforms.update (cyclomatic 18) src/scene/materials/standard-material-map-transforms.js:182— StandardMaterialMapTransforms.update has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Mesh.update (cyclomatic 18) src/scene/mesh.js:927— Mesh.update has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Culler.updateLightVisibility (cyclomatic 18) src/scene/renderer/culler.js:351— Culler.updateLightVisibility has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ply.readPly (cyclomatic 18) src/framework/parsers/ply.js:450— ply.readPly has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (find, startsWith, a function literal at line 544, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
GSplatProjector.dispatch (cyclomatic 18) src/scene/gsplat-unified/gsplat-projector.js:643— GSplatProjector.dispatch has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MeshInstance.getMaterialBindGroup (cyclomatic 18) src/scene/mesh-instance.js:1953— MeshInstance.getMaterialBindGroup has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ImageElement._updateMesh (cyclomatic 18) src/framework/components/element/image-element.js:487— ImageElement._updateMesh has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ModelComponentSystem.cloneComponent (cyclomatic 18) src/framework/components/model/system.js:98— ModelComponentSystem.cloneComponent has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
WebglGraphicsDevice.setTextureParameters (cyclomatic 18) src/platform/graphics/webgl/webgl-graphics-device.js:1888— WebglGraphicsDevice.setTextureParameters has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MouseEvent.constructor (cyclomatic 18) src/platform/input/mouse-event.js:119— MouseEvent.constructor has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GlbContainerResource.instantiateRenderEntity::cloneHierarchy (cyclomatic 18) src/framework/parsers/glb-container-resource.js:141— GlbContainerResource.instantiateRenderEntity::cloneHierarchy has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
evaluateNodeDistances (cyclomatic 18) src/scene/gsplat-unified/gsplat-octree-instance.js:503— evaluateNodeDistances has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
update (cyclomatic 18) src/framework/xr/xr-anchors.js:391— update has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AnnotationManager.initialize (cyclomatic 17) scripts/esm/annotations.mjs:812— AnnotationManager.initialize has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 918, prerenderHandler, createLayer, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
XrMenu.update (cyclomatic 17) scripts/esm/xr/xr-menu.mjs:1439— XrMenu.update has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LightsBuffer.addLightData (cyclomatic 17) src/scene/lighting/lights-buffer.js:194— LightsBuffer.addLightData has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GSplatBudgetBalancer._accumulate (cyclomatic 17) src/scene/gsplat-unified/gsplat-budget-balancer.js:219— GSplatBudgetBalancer._accumulate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorldClustersDebug.render (cyclomatic 17) src/scene/lighting/world-clusters-debug.js:54— WorldClustersDebug.render has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CollisionComponent.onEnable (cyclomatic 17) src/framework/components/collision/component.js:807— CollisionComponent.onEnable has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextElement.font (cyclomatic 17) src/framework/components/element/text-element.js:1894— TextElement.font has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ElementComponent._sync (cyclomatic 17) src/framework/components/element/component.js:2247— ElementComponent._sync has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ModelComponent.onEnable (cyclomatic 17) src/framework/components/model/component.js:982— ModelComponent.onEnable has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ElementInput._onElementMouseEvent (cyclomatic 17) src/framework/input/element-input.js:719— ElementInput._onElementMouseEvent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SpriteComponent._showFrame (cyclomatic 17) src/framework/components/sprite/component.js:881— SpriteComponent._showFrame has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
glb-parser.createMesh (cyclomatic 17) src/framework/parsers/glb-parser.js:421— glb-parser.createMesh has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 425, 491). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AnimComponentBinder._createAnimTargetForProperty (cyclomatic 17) src/framework/components/anim/component-binder.js:211— AnimComponentBinder._createAnimTargetForProperty has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ShadowRenderer.submitCasters (cyclomatic 17) src/scene/renderer/shadow-renderer.js:554— ShadowRenderer.submitCasters has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebgpuTexture.getSampler (cyclomatic 17) src/platform/graphics/webgpu/webgpu-texture.js:272— WebgpuTexture.getSampler has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ResourceLine.equals (cyclomatic 17) REDACTED:399— ResourceLine.equals has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
typedoc-plugin.load (cyclomatic 17) utils/typedoc/typedoc-plugin.mjs:76— typedoc-plugin.load has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 161, 109, 97, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
initGraphs (cyclomatic 17) src/extras/mini-stats/mini-stats.js:576— initGraphs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
update (cyclomatic 17) src/extras/mini-stats/mini-stats.js:734— update has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
renderLayerRenderStep (cyclomatic 17) src/scene/renderer/render-pass-forward.js:519— renderLayerRenderStep has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_updateTexOptions (cyclomatic 17) src/scene/materials/standard-material-options-builder.js:146— _updateTexOptions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
constructor::read (cyclomatic 17) src/scene/gsplat/gsplat-sog-data.js:64— constructor::read has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
tween.Tween.initialize (cyclomatic 16) scripts/animation/tween.js:121— tween.Tween.initialize has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 149, 170, 160). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CameraFrame.postUpdate (cyclomatic 16) scripts/esm/camera-frame.mjs:842— CameraFrame.postUpdate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
gsplat-mesh.rasterizeTriangle (cyclomatic 16) scripts/esm/gsplat/gsplat-mesh.mjs:34— gsplat-mesh.rasterizeTriangle has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GSplatText._rebuildFromText (cyclomatic 16) scripts/esm/gsplat/gsplat-text.mjs:131— GSplatText._rebuildFromText has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BlockAllocator._defragIncremental (cyclomatic 16) src/core/block-allocator.js:594— BlockAllocator._defragIncremental has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
uri.createURI (cyclomatic 16) src/core/uri.js:15— uri.createURI has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Compute.setupDispatchThreads (cyclomatic 16) src/platform/graphics/compute.js:566— Compute.setupDispatchThreads has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ShaderGeneratorStandard._addMapDefines (cyclomatic 16) src/scene/shader-lib/programs/standard.js:161— ShaderGeneratorStandard._addMapDefines has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GSplatWorldState.assignSplatOffsets (cyclomatic 16) src/scene/gsplat-unified/gsplat-world-state.js:266— GSplatWorldState.assignSplatOffsets has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GSplatWorld.applyWorkBufferUpdates (cyclomatic 16) src/scene/gsplat-unified/gsplat-world.js:946— GSplatWorld.applyWorkBufferUpdates has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 959). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
GSplatManager.update (cyclomatic 16) src/scene/gsplat-unified/gsplat-manager.js:656— GSplatManager.update has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MeshInstance.aabb (cyclomatic 16) src/scene/mesh-instance.js:873— MeshInstance.aabb has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
system.convertValue (cyclomatic 16) src/framework/components/system.js:229— system.convertValue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ModelComponent.mapping (cyclomatic 16) src/framework/components/model/component.js:729— ModelComponent.mapping has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShaderGeneratorParticle.createVertexDefines (cyclomatic 16) src/scene/shader-lib/programs/particle.js:28— ShaderGeneratorParticle.createVertexDefines has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ParticleEmitter._allocate (cyclomatic 16) src/scene/particle-system/particle-emitter.js:887— ParticleEmitter._allocate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParticleEmitter.addTime (cyclomatic 16) src/scene/particle-system/particle-emitter.js:1027— ParticleEmitter.addTime has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ShaderProcessorGLSL.processUniforms (cyclomatic 16) src/platform/graphics/shader-processor-glsl.js:289— ShaderProcessorGLSL.processUniforms has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 336, 296, 306, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Asset.file (cyclomatic 16) src/framework/asset/asset.js:462— Asset.file has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GltfExporter.collectResources (cyclomatic 16) src/extras/exporters/gltf-exporter.js:179— GltfExporter.collectResources has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 208, 258, 216). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
clear (cyclomatic 16) src/platform/graphics/webgl/webgl-graphics-device.js:2369— clear has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
destroy (cyclomatic 16) src/framework/app-base.js:1829— destroy has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
frameUpdate (cyclomatic 16) src/extras/effects/dynamic-sky/dynamic-sky-effect.js:1485— frameUpdate has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
createPrimitive (cyclomatic 16) src/extras/exporters/gltf-exporter.js:857— createPrimitive has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 867, 878, 877, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
load (cyclomatic 16) src/framework/parsers/ply.js:591— load has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Deprecated: eslint package.json:97— eslint 9.39.5, declared in package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
_updateMeshes (cognitive 232) src/framework/components/element/text-element.js:864— _updateMeshes has cognitive complexity 232 (threshold 15). Drivers by points: if/else 50 (146 pts), loops 12 (37 pts), boolean chains 25, ternaries 9 (24 pts) (nesting depth added 136). Of this number, 223 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
upload (cognitive 212) src/platform/graphics/webgl/webgl-texture.js:481— upload has cognitive complexity 212 (threshold 15). Drivers by points: if/else 57 (166 pts), boolean chains 24, loops 6 (22 pts) (nesting depth added 125). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
draw (cognitive 160) src/platform/graphics/webgl/webgl-graphics-device.js:2128— draw has cognitive complexity 160 (threshold 15). Drivers by points: if/else 40 (129 pts), loops 5 (19 pts), boolean chains 5, ternaries 1 (5 pts), other 2 (nesting depth added 107). Of this number, 149 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
initializeComponentData (cognitive 130) src/framework/components/element/system.js:107— initializeComponentData has cognitive complexity 130 (threshold 15). Drivers by points: if/else 72 (119 pts), boolean chains 10, ternaries 1 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_updateText (cognitive 123) src/framework/components/element/text-element.js:376— _updateText has cognitive complexity 123 (threshold 15). Drivers by points: if/else 33 (80 pts), ternaries 8 (28 pts), boolean chains 12, loops 2 (3 pts) (nesting depth added 68). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Preprocessor._preprocess (cognitive 113) REDACTED:232— Preprocessor._preprocess has cognitive complexity 113 (threshold 15). Drivers by points: if/else 27 (83 pts), ternaries 5 (16 pts), loops 2 (8 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 74). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
constructor (cognitive 109) src/platform/graphics/render-target.js:388— constructor has cognitive complexity 109 (threshold 15). Drivers by points: if/else 40 (55 pts), other 21, boolean chains 19, ternaries 10 (14 pts) (nesting depth added 19). Of this number, 84 points are the body's own statements and 25 belong to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rawToValue (cognitive 106) src/framework/script/script-attributes.js:20— rawToValue has cognitive complexity 106 (threshold 15). Drivers by points: if/else 29 (64 pts), loops 5 (17 pts), ternaries 4 (17 pts), boolean chains 7, match/switch 1 (nesting depth added 60). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
update (cognitive 105) src/scene/particle-system/cpu-updater.js:98— update has cognitive complexity 105 (threshold 15). Drivers by points: if/else 29 (70 pts), ternaries 8 (17 pts), loops 6 (12 pts), boolean chains 6 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mesh._initBoneAabbs (cognitive 101) src/scene/mesh.js:472— Mesh._initBoneAabbs has cognitive complexity 101 (threshold 15). Drivers by points: if/else 22 (86 pts), loops 6 (12 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 71). Of this number, 99 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lightmapper.bakeInternal (cognitive 97) src/framework/lightmapper/lightmapper.js:932— Lightmapper.bakeInternal has cognitive complexity 97 (threshold 15). Drivers by points: if/else 13 (50 pts), loops 11 (28 pts), ternaries 3 (15 pts), boolean chains 4 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
create (cognitive 97) src/scene/batching/batch-manager.js:686— create has cognitive complexity 97 (threshold 15). Drivers by points: if/else 18 (49 pts), loops 10 (35 pts), ternaries 2 (8 pts), boolean chains 5 (nesting depth added 62). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
RigidBodyComponentSystem.onContactPair (cognitive 96) src/framework/components/rigid-body/system.js:882— RigidBodyComponentSystem.onContactPair has cognitive complexity 96 (threshold 15). Drivers by points: if/else 25 (80 pts), boolean chains 13, loops 1 (3 pts) (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
StandardMaterialValidator.validate (cognitive 91) src/scene/materials/standard-material-validator.js:72— StandardMaterialValidator.validate has cognitive complexity 91 (threshold 15). Drivers by points: if/else 32 (79 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
log (cognitive 88) src/platform/graphics/render-pass.js:779— log has cognitive complexity 88 (threshold 15). Drivers by points: ternaries 26 (73 pts), if/else 4 (9 pts), boolean chains 2, loops 1 (2 pts), other 2 (nesting depth added 53). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
onAssetChanged (cognitive 88) src/framework/components/animation/component.js:580— onAssetChanged has cognitive complexity 88 (threshold 15). Drivers by points: if/else 19 (60 pts), loops 4 (18 pts), boolean chains 10 (nesting depth added 55). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ShaderGeneratorStandard.createShaderDefinition (cognitive 83) src/scene/shader-lib/programs/standard.js:355— ShaderGeneratorStandard.createShaderDefinition has cognitive complexity 83 (threshold 15). Drivers by points: if/else 24 (53 pts), ternaries 6 (23 pts), boolean chains 7 (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GltfExporter.writeStandardMaterial (cognitive 83) src/extras/exporters/gltf-exporter.js:491— GltfExporter.writeStandardMaterial has cognitive complexity 83 (threshold 15). Drivers by points: if/else 40 (64 pts), boolean chains 12, ternaries 5 (7 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebgpuTexture.uploadData (cognitive 81) src/platform/graphics/webgpu/webgpu-texture.js:386— WebgpuTexture.uploadData has cognitive complexity 81 (threshold 15). Drivers by points: if/else 27 (64 pts), loops 3 (13 pts), boolean chains 4 (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
init (cognitive 78) src/platform/graphics/webgl/webgl-render-target.js:169— init has cognitive complexity 78 (threshold 15). Drivers by points: if/else 20 (52 pts), ternaries 5 (17 pts), loops 2 (5 pts), boolean chains 2, other 2 (nesting depth added 47). Of this number, 75 points are the body's own statements and 3 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ForwardRenderer.buildFrameGraph (cognitive 77) src/scene/renderer/forward-renderer.js:665— ForwardRenderer.buildFrameGraph has cognitive complexity 77 (threshold 15). Drivers by points: if/else 18 (58 pts), boolean chains 12, ternaries 2 (6 pts), loops 1 (nesting depth added 44). Of this number, 74 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ConeBaseGeometry.constructor (cognitive 77) src/scene/geometry/cone-base-geometry.js:14— ConeBaseGeometry.constructor has cognitive complexity 77 (threshold 15). Drivers by points: if/else 14 (41 pts), loops 12 (31 pts), boolean chains 5 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElementComponentSystem.getImageElementMaterial (cognitive 76) src/framework/components/element/system.js:452— ElementComponentSystem.getImageElementMaterial has cognitive complexity 76 (threshold 15). Drivers by points: if/else 30 (76 pts) (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GSplatBudgetBalancer.balance (cognitive 73) src/scene/gsplat-unified/gsplat-budget-balancer.js:85— GSplatBudgetBalancer.balance has cognitive complexity 73 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 9 (19 pts), ternaries 3 (11 pts), boolean chains 2 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frameUpdate (cognitive 71) src/extras/effects/lens-flare/lens-flare-effect.js:381— frameUpdate has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (40 pts), ternaries 8 (26 pts), boolean chains 4, loops 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LayerComposition._update (cognitive 69) src/scene/composition/layer-composition.js:150— LayerComposition._update has cognitive complexity 69 (threshold 15). Drivers by points: if/else 14 (53 pts), loops 5 (12 pts), boolean chains 4 (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
rebuildGeometry (cognitive 66) src/extras/mini-stats/mini-stats.js:792— rebuildGeometry has cognitive complexity 66 (threshold 15). Drivers by points: if/else 12 (30 pts), ternaries 8 (22 pts), boolean chains 13, loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatDirector.update (cognitive 64) src/scene/gsplat-unified/gsplat-director.js:349— GSplatDirector.update has cognitive complexity 64 (threshold 15). Drivers by points: if/else 15 (50 pts), loops 5 (9 pts), boolean chains 5 (nesting depth added 39). Of this number, 54 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
create (cognitive 64) src/framework/components/script/component.js:769— create has cognitive complexity 64 (threshold 15). Drivers by points: if/else 19 (50 pts), boolean chains 9, ternaries 2 (5 pts) (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
render-physics.RenderPhysics.postUpdate (cognitive 60) scripts/physics/render-physics.js:71— render-physics.RenderPhysics.postUpdate has cognitive complexity 60 (threshold 15). Drivers by points: if/else 15 (48 pts), match/switch 2 (9 pts), boolean chains 3 (nesting depth added 40). Most of this is not in the body itself: 1 of the 60 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 81, 205). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
GSplatOctreeInstance.applyLodChanges (cognitive 60) src/scene/gsplat-unified/gsplat-octree-instance.js:635— GSplatOctreeInstance.applyLodChanges has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (47 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
start (cognitive 60) src/framework/xr/xr-manager.js:537— start has cognitive complexity 60 (threshold 15). Drivers by points: if/else 26 (52 pts), boolean chains 7, other 1 (nesting depth added 26). Of this number, 56 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TagsCache.find (cognitive 59) src/core/tags-cache.js:86— TagsCache.find has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (45 pts), loops 4 (12 pts), boolean chains 2 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Texture.setSource (cognitive 59) src/platform/graphics/texture.js:1262— Texture.setSource has cognitive complexity 59 (threshold 15). Drivers by points: if/else 23 (41 pts), boolean chains 9, loops 3 (9 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_drawArea (cognitive 57) src/extras/gizmo/handle/light-gizmo.js:178— _drawArea has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 6 (21 pts), loops 5 (12 pts), match/switch 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ObjModelParser.parse (cognitive 56) scripts/esm/parsers/obj-model.mjs:48— ObjModelParser.parse has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (45 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlbContainerResource.instantiateRenderEntity::cloneHierarchy (cognitive 56) src/framework/parsers/glb-container-resource.js:141— GlbContainerResource.instantiateRenderEntity::cloneHierarchy has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (45 pts), loops 4 (11 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ResourceLoader.load (cognitive 56) src/framework/handlers/loader.js:125— ResourceLoader.load has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (45 pts), error handling 2 (6 pts), boolean chains 5 (nesting depth added 30). Of this number, 28 points are the body's own statements and 28 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ShadowRenderer.cullShadowCastersOmni (cognitive 56) src/scene/renderer/shadow-renderer.js:302— ShadowRenderer.cullShadowCastersOmni has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (35 pts), boolean chains 11, loops 6 (10 pts) (nesting depth added 28). Of this number, 54 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draw (cognitive 56) src/platform/graphics/webgpu/webgpu-graphics-device.js:1368— draw has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 6, ternaries 2 (6 pts), loops 1 (3 pts), other 3 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
copyRenderTarget (cognitive 55) src/platform/graphics/webgpu/webgpu-graphics-device.js:2121— copyRenderTarget has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 15 (32 pts), if/else 9 (17 pts), boolean chains 3, other 3 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
update (cognitive 55) src/framework/handlers/cubemap.js:104— update has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 14, ternaries 4 (12 pts), loops 4 (10 pts), other 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnimController.update (cognitive 54) src/framework/anim/controller/anim-controller.js:609— AnimController.update has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 6 (19 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
system.recreateShapes (cognitive 53) src/framework/components/collision/system.js:329— system.recreateShapes has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (45 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
createAnimation (cognitive 52) src/framework/parsers/glb-parser.js:673— createAnimation has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 11 (15 pts), ternaries 4 (7 pts), boolean chains 5 (nesting depth added 20). Of this number, 40 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resolveDuplicatedEntityReferenceProperties (cognitive 51) src/framework/components/script/component.js:1043— resolveDuplicatedEntityReferenceProperties has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (13 pts), boolean chains 4, ternaries 1 (4 pts), other 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
request (cognitive 50) src/platform/net/http.js:374— request has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (38 pts), loops 2 (5 pts), match/switch 1 (3 pts), boolean chains 2, error handling 1, ternaries 1 (nesting depth added 23). Of this number, 46 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
processParentheses (cognitive 49) REDACTED:595— processParentheses has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 4 (6 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderForwardInternal (cognitive 48) src/scene/renderer/forward-renderer.js:285— renderForwardInternal has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 8 (11 pts), boolean chains 6, loops 2 (4 pts), other 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParticleSystemComponentSystem.onUpdate (cognitive 47) src/framework/components/particle-system/system.js:213— ParticleSystemComponentSystem.onUpdate has cognitive complexity 47 (threshold 15). Drivers by points: if/else 8 (33 pts), loops 4 (13 pts), boolean chains 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MaterialHandler._bindAndAssignAssets (cognitive 47) src/framework/handlers/material.js:227— MaterialHandler._bindAndAssignAssets has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (41 pts), boolean chains 3, loops 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createImages (cognitive 47) src/framework/parsers/glb-parser.js:1361— createImages has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (33 pts), loops 2 (8 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 18). Most of this is not in the body itself: 2 of the 47 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 1384, a function literal at line 1481, loadTexture::(anonymous)::continuation, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_rebuildElements (cognitive 47) src/extras/effects/lens-flare/lens-flare-effect.js:285— _rebuildElements has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 5 (16 pts), other 11, loops 5 (10 pts), if/else 5 (9 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShadowRendererDirectional.cull (cognitive 46) src/scene/renderer/shadow-renderer-directional.js:220— ShadowRendererDirectional.cull has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 6 (10 pts), ternaries 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DdsParser.open (cognitive 46) src/framework/parsers/texture/dds.js:29— DdsParser.open has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (32 pts), ternaries 4 (9 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_updateWorldState (cognitive 46) src/scene/gsplat-unified/gsplat-world.js:599— _updateWorldState has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 9 (17 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 20). Of this number, 34 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateStateFromTransition (cognitive 45) src/framework/anim/controller/anim-controller.js:422— updateStateFromTransition has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (28 pts), ternaries 4 (9 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RigidBodyComponentSystem._cleanOldCollisions (cognitive 44) src/framework/components/rigid-body/system.js:790— RigidBodyComponentSystem._cleanOldCollisions has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (39 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WebglGraphicsDevice.endRenderPass (cognitive 44) src/platform/graphics/webgl/webgl-graphics-device.js:1624— WebglGraphicsDevice.endRenderPass has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (34 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextureAtlasHandler.patch (cognitive 44) src/framework/handlers/texture-atlas.js:110— TextureAtlasHandler.patch has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
constructor (cognitive 44) src/platform/graphics/texture.js:295— constructor has cognitive complexity 44 (threshold 15). Drivers by points: other 23, if/else 9 (10 pts), boolean chains 7, ternaries 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
renderForwardLayer (cognitive 44) src/scene/renderer/forward-renderer.js:489— renderForwardLayer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 3 (10 pts), other 8, boolean chains 4 (nesting depth added 17). Of this number, 26 points are the body's own statements and 18 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
_logRenderActions (cognitive 44) src/scene/composition/layer-composition.js:375— _logRenderActions has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 9 (36 pts), if/else 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchManager.prepare (cognitive 43) src/scene/batching/batch-manager.js:483— BatchManager.prepare has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (33 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (nesting depth added 21). Of this number, 40 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_validateCopy (cognitive 43) src/platform/graphics/texture.js:1507— _validateCopy has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 11, other 9, ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
FrameGraph._compilePasses (cognitive 42) src/scene/frame-graph.js:186— FrameGraph._compilePasses has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
constructor (cognitive 42) src/platform/graphics/webgl/webgl-graphics-device.js:230— constructor has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 16, ternaries 2 (4 pts), other 2 (nesting depth added 5). Of this number, 21 points are the body's own statements and 21 belong to 30 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
setupForRenderPass (cognitive 42) src/platform/graphics/webgpu/webgpu-render-target.js:604— setupForRenderPass has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 8 (19 pts), if/else 7 (14 pts), boolean chains 7, loops 1, other 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HdrParser._readPixels (cognitive 41) src/framework/parsers/texture/hdr.js:123— HdrParser._readPixels has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 5 (16 pts), boolean chains 3, ternaries 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatWorldState.assignSplatOffsets (cognitive 40) src/scene/gsplat-unified/gsplat-world-state.js:266— GSplatWorldState.assignSplatOffsets has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 3 (9 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventHandler.off (cognitive 39) src/core/event-handler.js:168— EventHandler.off has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 5 (12 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mesh.update (cognitive 39) src/scene/mesh.js:927— Mesh.update has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (37 pts), boolean chains 2 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
gsplat-sort-worker.SortWorker::update (cognitive 39) src/scene/gsplat/gsplat-sort-worker.js:46— gsplat-sort-worker.SortWorker::update has cognitive complexity 39 (threshold 15). Drivers by points: loops 10 (18 pts), if/else 10 (11 pts), ternaries 4 (7 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Skeleton.addTime (cognitive 39) src/scene/animation/skeleton.js:143— Skeleton.addTime has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (12 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_allocate (cognitive 39) src/scene/particle-system/particle-emitter.js:887— _allocate has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (8 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatWorkBufferRenderPass.update (cognitive 38) src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js:116— GSplatWorkBufferRenderPass.update has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 4 (9 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatLodTable.constructor (cognitive 38) src/scene/gsplat-unified/gsplat-lod-table.js:101— GSplatLodTable.constructor has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 5 (14 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lightmapper.collectModels (cognitive 38) src/framework/lightmapper/lightmapper.js:309— Lightmapper.collectModels has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
khr-lights-punctual.createLights (cognitive 38) src/framework/parsers/glb/extensions/khr-lights-punctual.js:49— khr-lights-punctual.createLights has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (31 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 27). Most of this is not in the body itself: 4 of the 38 points are its own statements and the rest belongs to one function literal inside it that branches (line 64). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
createMaterial (cognitive 38) src/framework/parsers/glb-parser.js:534— createMaterial has cognitive complexity 38 (threshold 15). Drivers by points: if/else 21 (32 pts), loops 1 (2 pts), match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
update (cognitive 38) src/scene/gsplat-unified/gsplat-world.js:452— update has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 7 (12 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 13). Of this number, 28 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatOctreeInstance.update (cognitive 37) src/scene/gsplat-unified/gsplat-octree-instance.js:922— GSplatOctreeInstance.update has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (14 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GSplatBudgetBalancer._accumulate (cognitive 37) src/scene/gsplat-unified/gsplat-budget-balancer.js:219— GSplatBudgetBalancer._accumulate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (15 pts), ternaries 4 (15 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
khr-draco-mesh-compression.createDracoMesh (cognitive 37) src/framework/parsers/glb/extensions/khr-draco-mesh-compression.js:15— khr-draco-mesh-compression.createDracoMesh has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (9 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 19). Most of this is not in the body itself: 2 of the 37 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 23, 75, 20). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
rebuild (cognitive 37) src/scene/particle-system/particle-emitter.js:553— rebuild has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 11 (16 pts), if/else 12 (14 pts), boolean chains 4, loops 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MeshInstance.aabb (cognitive 36) src/scene/mesh-instance.js:873— MeshInstance.aabb has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
glb-parser.createMesh (cognitive 36) src/framework/parsers/glb-parser.js:421— glb-parser.createMesh has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 16). None of this is in the body itself: all 36 points belong to 2 function literals inside it that branch (lines 425, 491). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CubemapHandler.loadAssets (cognitive 36) src/framework/handlers/cubemap.js:236— CubemapHandler.loadAssets has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 14). Of this number, 24 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reprojectTexture (cognitive 36) src/scene/graphics/reproject-texture.js:391— reprojectTexture has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 12 (16 pts), if/else 8 (11 pts), boolean chains 4, other 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XrManipulation.update (cognitive 35) scripts/esm/xr/xr-manipulation.mjs:552— XrManipulation.update has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 9, loops 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnimStateGraph.constructor (cognitive 35) src/framework/anim/state-graph/anim-state-graph.js:28— AnimStateGraph.constructor has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 5 (14 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElementComponent._sync (cognitive 35) src/framework/components/element/component.js:2247— ElementComponent._sync has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebglGraphicsDevice.copyRenderTarget (cognitive 35) src/platform/graphics/webgl/webgl-graphics-device.js:1322— WebglGraphicsDevice.copyRenderTarget has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 7 (9 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnimEvaluator.update (cognitive 35) src/framework/anim/evaluator/anim-evaluator.js:203— AnimEvaluator.update has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphNode._sync (cognitive 34) src/scene/graph-node.js:1550— GraphNode._sync has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 1 (5 pts), boolean chains 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GSplatWorld.cleanupOldWorldStates (cognitive 34) src/scene/gsplat-unified/gsplat-world.js:888— GSplatWorld.cleanupOldWorldStates has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 5 (12 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AnimationComponent.update (cognitive 34) src/framework/components/animation/component.js:743— AnimationComponent.update has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
startRenderPass (cognitive 34) src/platform/graphics/webgl/webgl-graphics-device.js:1511— startRenderPass has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (8 pts), boolean chains 3, loops 1 (2 pts), other 2 (nesting depth added 15). Of this number, 33 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
update (cognitive 34) src/framework/xr/xr-anchors.js:391— update has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (20 pts), error handling 3 (8 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 17). Of this number, 24 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XrMenu._updateRayInteraction (cognitive 33) scripts/esm/xr/xr-menu.mjs:1548— XrMenu._updateRayInteraction has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Culler.updateLightVisibility (cognitive 33) src/scene/renderer/culler.js:351— Culler.updateLightVisibility has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 6 (7 pts), boolean chains 3 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WorldClustersDebug.render (cognitive 33) src/scene/lighting/world-clusters-debug.js:54— WorldClustersDebug.render has cognitive complexity 33 (threshold 15). Drivers by points: loops 7 (17 pts), if/else 9 (16 pts) (nesting depth added 17). Of this number, 25 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
GSplatComponent.castShadows (cognitive 33) src/framework/components/gsplat/component.js:331— GSplatComponent.castShadows has cognitive complexity 33 (threshold 15). Drivers by points: loops 4 (16 pts), if/else 7 (15 pts), boolean chains 2 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
HandleGizmo._boxHandles (cognitive 33) src/extras/gizmo/handle/handle-gizmo.js:744— HandleGizmo._boxHandles has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (8 pts), ternaries 3 (8 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoundedBoxGeometry.constructor (cognitive 33) src/scene/geometry/rounded-box-geometry.js:138— RoundedBoxGeometry.constructor has cognitive complexity 33 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 4 (10 pts), boolean chains 1, ternaries 1 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LightTextureAtlas.subdivide (cognitive 32) src/scene/lighting/light-texture-atlas.js:150— LightTextureAtlas.subdivide has cognitive complexity 32 (threshold 15). Drivers by points: loops 4 (20 pts), if/else 6 (11 pts), boolean chains 1 (nesting depth added 21). Of this number, 31 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RenderComponent.castShadows (cognitive 32) src/framework/components/render/component.js:424— RenderComponent.castShadows has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (11 pts), boolean chains 2 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ScriptComponent.scripts (cognitive 32) src/framework/components/script/component.js:230— ScriptComponent.scripts has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 2 (5 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AnimEvaluator.addClip (cognitive 32) src/framework/anim/evaluator/anim-evaluator.js:43— AnimEvaluator.addClip has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
entity.resolveDuplicatedEntityReferenceProperties (cognitive 32) src/framework/entity.js:870— entity.resolveDuplicatedEntityReferenceProperties has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (7 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setCameraUniforms (cognitive 32) src/scene/renderer/renderer.js:502— setCameraUniforms has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 11 (15 pts), if/else 7 (12 pts), other 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
computeDistanceRange (cognitive 32) src/scene/gsplat-unified/gsplat-hybrid-renderer.js:656— computeDistanceRange has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 5 (11 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpriteAnimationClip.sprite (cognitive 31) src/framework/components/sprite/sprite-animation-clip.js:220— SpriteAnimationClip.sprite has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 3 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ScriptRegistry.add (cognitive 31) src/framework/script/script-registry.js:107— ScriptRegistry.add has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 11). Most of this is not in the body itself: 3 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 159, 134). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ShadowRenderer.submitCasters (cognitive 31) src/scene/renderer/shadow-renderer.js:554— ShadowRenderer.submitCasters has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 15). Of this number, 23 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BoundingBoxGizmo._drawBrackets (cognitive 31) src/extras/gizmo/handle/bounding-box-gizmo.js:297— BoundingBoxGizmo._drawBrackets has cognitive complexity 31 (threshold 15). Drivers by points: loops 6 (15 pts), ternaries 2 (11 pts), if/else 2 (5 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
attachTexture (cognitive 31) src/extras/exporters/gltf-exporter.js:421— attachTexture has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 6, other 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShaderGeneratorStandard._addMapDefines (cognitive 30) src/scene/shader-lib/programs/standard.js:161— ShaderGeneratorStandard._addMapDefines has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). Of this number, 23 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GltfAccessor.getData (cognitive 30) src/framework/parsers/glb/gltf-accessor.js:134— GltfAccessor.getData has cognitive complexity 30 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 9 (13 pts), boolean chains 3 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
XrHand.update (cognitive 30) src/framework/xr/xr-hand.js:151— XrHand.update has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElementInput._onElementSelectEvent (cognitive 30) src/framework/input/element-input.js:837— ElementInput._onElementSelectEvent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebgpuCompute.updateBindGroup (cognitive 30) src/platform/graphics/webgpu/webgpu-compute.js:216— WebgpuCompute.updateBindGroup has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 6 (12 pts), boolean chains 1 (nesting depth added 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initDepthStencil (cognitive 30) src/platform/graphics/webgpu/webgpu-render-target.js:315— initDepthStencil has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
constructor::read (cognitive 30) src/scene/gsplat/gsplat-sog-data.js:64— constructor::read has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 4 (14 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
GSplatMesh.buildFromEntity (cognitive 29) scripts/esm/gsplat/gsplat-mesh.mjs:297— GSplatMesh.buildFromEntity has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (11 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tags._processArguments (cognitive 29) src/core/tags.js:257— Tags._processArguments has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
markup.resolveMarkupTags (cognitive 29) src/framework/components/element/markup.js:376— markup.resolveMarkupTags has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 6 (7 pts), ternaries 1 (3 pts) (nesting depth added 11). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelComponent.mapping (cognitive 29) src/framework/components/model/component.js:729— ModelComponent.mapping has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draco-worker.DracoWorker::decodeMesh (cognitive 29) src/framework/parsers/draco-worker.js:138— draco-worker.DracoWorker::decodeMesh has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 7 (8 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
texture._completePartialMipmapChain (cognitive 29) src/framework/handlers/texture.js:101— texture._completePartialMipmapChain has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (19 pts), boolean chains 6, if/else 3 (4 pts) (nesting depth added 13). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 2 function items inside it that branch (downsample, isHtmlElement). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AppBase._parseApplicationProperties (cognitive 29) src/framework/app-base.js:874— AppBase._parseApplicationProperties has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebgpuGraphicsDevice.endRenderPass (cognitive 29) src/platform/graphics/webgpu/webgpu-graphics-device.js:1685— WebgpuGraphicsDevice.endRenderPass has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 3 (12 pts), boolean chains 3, loops 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity· play (cognitive 29) · ×1
play (cognitive 29) src/framework/components/animation/component.js:307— play has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_setupLight (cognitive 29) src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:242— _setupLight has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11 (16 pts), if/else 6 (7 pts), boolean chains 4, other 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatWorld.applyWorkBufferUpdates (cognitive 28) src/scene/gsplat-unified/gsplat-world.js:946— GSplatWorld.applyWorkBufferUpdates has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (6 pts), boolean chains 4 (nesting depth added 11). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 959). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
khr-gaussian-splatting.createGSplatData (cognitive 28) src/framework/parsers/glb/extensions/khr-gaussian-splatting.js:29— khr-gaussian-splatting.createGSplatData has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 11). Of this number, 22 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelComponent.onEnable (cognitive 28) src/framework/components/model/component.js:982— ModelComponent.onEnable has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParticleSystemComponentSystem.initializeComponentData (cognitive 28) src/framework/components/particle-system/system.js:126— ParticleSystemComponentSystem.initializeComponentData has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 3, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchManager.collectBatchedMeshData (cognitive 28) src/scene/batching/batch-manager.js:606— BatchManager.collectBatchedMeshData has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
glb-parser.createCameras (cognitive 28) src/framework/parsers/glb-parser.js:1193— glb-parser.createCameras has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (23 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 19). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 1203). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
basis.prepareWorkerModules (cognitive 28) src/framework/handlers/basis.js:24— basis.prepareWorkerModules has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 2, error handling 1 (nesting depth added 9). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 5 function items inside it that branch (wasmSupported, a function literal at line 68, a function literal at line 86, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
RenderPassPicker.execute (cognitive 28) src/framework/graphics/render-pass-picker.js:133— RenderPassPicker.execute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 3 (7 pts), loops 3 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LightGizmo._drawSpot (cognitive 28) src/extras/gizmo/handle/light-gizmo.js:271— LightGizmo._drawSpot has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 7 (11 pts), loops 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MiniStats.postRender (cognitive 28) src/extras/mini-stats/mini-stats.js:981— MiniStats.postRender has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (9 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextureRenderer.draw (cognitive 28) src/extras/renderers/texture-renderer.js:228— TextureRenderer.draw has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, ternaries 6 (10 pts), if/else 5 (6 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
copyTextureToTexture (cognitive 28) src/platform/graphics/webgl/webgl-graphics-device.js:1404— copyTextureToTexture has cognitive complexity 28 (threshold 15). Drivers by points: other 11, if/else 6 (9 pts), ternaries 4 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
update (cognitive 28) src/extras/mini-stats/mini-stats.js:734— update has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 3, other 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Water._frameUpdate (cognitive 27) scripts/esm/water.mjs:1660— Water._frameUpdate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 9, ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
BlockAllocator._defragIncremental (cognitive 27) src/core/block-allocator.js:594— BlockAllocator._defragIncremental has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LightSlotUniforms.appendFormats (cognitive 27) src/scene/lighting/light-slot-uniforms.js:101— LightSlotUniforms.appendFormats has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (27 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SkinInstanceCache.removeCachedSkinInstance (cognitive 27) src/scene/skin-instance-cache.js:96— SkinInstanceCache.removeCachedSkinInstance has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (27 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ElementInput._getTargetElement (cognitive 27) src/framework/input/element-input.js:975— ElementInput._getTargetElement has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JsonStandardMaterialParser.initialize (cognitive 27) src/framework/parsers/material/json-standard-material.js:71— JsonStandardMaterialParser.initialize has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Asset.file (cognitive 27) src/framework/asset/asset.js:462— Asset.file has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 6, loops 1 (3 pts), ternaries 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
initGraphs (cognitive 27) src/extras/mini-stats/mini-stats.js:576— initGraphs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (7 pts), loops 3, boolean chains 2, other 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnimClip._update (cognitive 26) src/framework/anim/evaluator/anim-clip.js:222— AnimClip._update has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LightTextureAtlas.update (cognitive 26) src/scene/lighting/light-texture-atlas.js:323— LightTextureAtlas.update has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Renderer.collectLights (cognitive 26) src/scene/renderer/renderer.js:1285— Renderer.collectLights has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (21 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextElement.font (cognitive 26) src/framework/components/element/text-element.js:1894— TextElement.font has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_updateMesh (cognitive 26) src/framework/components/element/image-element.js:487— _updateMesh has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
evaluateNodeDistances (cognitive 26) src/scene/gsplat-unified/gsplat-octree-instance.js:503— evaluateNodeDistances has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (3 pts), boolean chains 2, loops 1, other 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_getSelection (cognitive 26) src/extras/gizmo/gizmo.js:713— _getSelection has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts), ternaries 1 (5 pts), boolean chains 3, other 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
collectDirectionalShadowLights (cognitive 26) src/scene/renderer/culler.js:298— collectDirectionalShadowLights has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (9 pts), boolean chains 1, other 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tween.Tween.initialize (cognitive 25) scripts/animation/tween.js:121— tween.Tween.initialize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5, boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 149, 160, 170). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
XrControllers.update (cognitive 25) scripts/esm/xr/xr-controllers.mjs:386— XrControllers.update has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XrNavigation.update (cognitive 25) scripts/esm/xr/xr-navigation.mjs:747— XrNavigation.update has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BundleRegistry._onAssetRemove (cognitive 25) src/framework/bundle/bundle-registry.js:137— BundleRegistry._onAssetRemove has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (8 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LightSlotUniforms._dispatchDirectional (cognitive 25) src/scene/lighting/light-slot-uniforms.js:199— LightSlotUniforms._dispatchDirectional has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 5 (9 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 14). Of this number, 22 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ply.readPly (cognitive 25) src/framework/parsers/ply.js:450— ply.readPly has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 4 function items inside it that branch (find, startsWith, a function literal at line 544, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WebglShader.finalize (cognitive 25) src/platform/graphics/webgl/webgl-shader.js:293— WebglShader.finalize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 2 (4 pts), loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lightmapper.calculateLightmapSize (cognitive 25) src/framework/lightmapper/lightmapper.js:407— Lightmapper.calculateLightmapSize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 4 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ElementInput._onElementMouseEvent (cognitive 25) src/framework/input/element-input.js:719— ElementInput._onElementMouseEvent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelHandler.patch (cognitive 25) src/framework/handlers/model.js:37— ModelHandler.patch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (25 pts) (nesting depth added 11). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 45, 47, 55). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
createBufferViews (cognitive 25) src/framework/parsers/glb-parser.js:1767— createBufferViews has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 11). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1816, 1791, 1805, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity· material (cognitive 25) · ×1
material (cognitive 25) src/framework/components/element/image-element.js:1052— material has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 10). Of this number, 19 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
processAttributes (cognitive 25) src/platform/graphics/shader-processor-glsl.js:449— processAttributes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (10 pts), boolean chains 2 (nesting depth added 15). None of this is in the body itself: all 25 points belong to one function literal inside it that branches (line 452). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
createDefinition (cognitive 25) src/platform/graphics/shader-definition-utils.js:88— createDefinition has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), other 5, loops 2 (4 pts), ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (getDefines, getDefinesWgsl, normalizedOutputTypes). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
orbit-camera.OrbitCamera._buildAabb (cognitive 24) scripts/camera/orbit-camera.js:294— orbit-camera.OrbitCamera._buildAabb has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 7 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VertexFormat.constructor (cognitive 24) src/platform/graphics/vertex-format.js:139— VertexFormat.constructor has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 7 (10 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Culler.cullLights (cognitive 24) src/scene/renderer/culler.js:154— Culler.cullLights has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Parser._parseTag (cognitive 24) src/framework/components/element/markup.js:254— Parser._parseTag has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelComponent.castShadows (cognitive 24) src/framework/components/model/component.js:466— ModelComponent.castShadows has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShaderProcessorGLSL.processUniforms (cognitive 24) src/platform/graphics/shader-processor-glsl.js:289— ShaderProcessorGLSL.processUniforms has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 2 (nesting depth added 6). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 336, 296, 306, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WebglGraphicsDevice.setDepthState (cognitive 24) src/platform/graphics/webgl/webgl-graphics-device.js:3058— WebglGraphicsDevice.setDepthState has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Controller.isPressed (cognitive 24) src/platform/input/controller.js:312— Controller.isPressed has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Controller.wasPressed) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Controller.wasPressed (cognitive 24) src/platform/input/controller.js:353— Controller.wasPressed has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Controller.isPressed) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
onEnable (cognitive 24) src/framework/components/particle-system/component.js:2140— onEnable has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
addTime (cognitive 24) src/scene/particle-system/particle-emitter.js:1027— addTime has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 4 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
constructor (cognitive 24) src/extras/mini-stats/mini-stats.js:129— constructor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, other 5, ternaries 2 (4 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 209, 223, 203, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
getSampler (cognitive 24) src/platform/graphics/webgpu/webgpu-texture.js:272— getSampler has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderLayerRenderStep (cognitive 24) src/scene/renderer/render-pass-forward.js:519— renderLayerRenderStep has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, other 2, ternaries 2 (nesting depth added 8). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_findTransition (cognitive 24) src/framework/anim/controller/anim-controller.js:342— _findTransition has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 8). Of this number, 12 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_updateEnvOptions (cognitive 24) src/scene/materials/standard-material-options-builder.js:304— _updateEnvOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, ternaries 3 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
load (cognitive 24) src/framework/parsers/sog-bundle.js:188— load has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 2, loops 2, other 1, ternaries 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 4 belong to 12 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
gsplat-mesh.rasterizeTriangle (cognitive 23) scripts/esm/gsplat/gsplat-mesh.mjs:34— gsplat-mesh.rasterizeTriangle has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 7 (9 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vat-converter.sampleAnimations (cognitive 23) scripts/esm/vat/vat-converter.mjs:180— vat-converter.sampleAnimations has cognitive complexity 23 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 3 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 10). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 231). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
XrMenu._checkFingerTouch (cognitive 23) scripts/esm/xr/xr-menu.mjs:1333— XrMenu._checkFingerTouch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XrMenu.update (cognitive 23) scripts/esm/xr/xr-menu.mjs:1439— XrMenu.update has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StandardMaterialMapTransforms.collectUnapplied (cognitive 23) src/scene/materials/standard-material-map-transforms.js:250— StandardMaterialMapTransforms.collectUnapplied has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VertexIterator.writeData (cognitive 23) src/platform/graphics/vertex-iterator.js:329— VertexIterator.writeData has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (8 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VertexIterator.readData (cognitive 23) src/platform/graphics/vertex-iterator.js:385— VertexIterator.readData has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (7 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Morph._initTextureBased (cognitive 23) src/scene/morph.js:162— Morph._initTextureBased has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4 (8 pts), ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Renderer.updateShaders (cognitive 23) src/scene/renderer/renderer.js:1351— Renderer.updateShaders has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (20 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WebglGraphicsDevice.activateShader (cognitive 23) src/platform/graphics/webgl/webgl-graphics-device.js:3163— WebglGraphicsDevice.activateShader has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (23 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SpriteComponent._showFrame (cognitive 23) src/framework/components/sprite/component.js:881— SpriteComponent._showFrame has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
HandleGizmo._resizeBox (cognitive 23) src/extras/gizmo/handle/handle-gizmo.js:837— HandleGizmo._resizeBox has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
readTextureAsync (cognitive 23) src/platform/graphics/webgl/webgl-graphics-device.js:2603— readTextureAsync has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7, other 6, loops 2 (5 pts), ternaries 3, boolean chains 1, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 2677, a function literal at line 2670, release, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
createPrimitive (cognitive 23) src/extras/exporters/gltf-exporter.js:857— createPrimitive has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2, boolean chains 1, other 1 (nesting depth added 8). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 867, 878, 877, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
generateWireframe (cognitive 23) src/scene/mesh.js:1107— generateWireframe has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 3 (8 pts), loops 3 (7 pts), if/else 3 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
load (cognitive 23) src/framework/parsers/ply.js:591— load has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), other 4, ternaries 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 7). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cullMeshInstances (cognitive 23) src/scene/renderer/culler.js:99— cullMeshInstances has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (14 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
collectAttributes (cognitive 23) src/platform/graphics/shader-definition-utils.js:340— collectAttributes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateClusters (cognitive 23) src/scene/lighting/world-clusters.js:369— updateClusters has cognitive complexity 23 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (9 pts), ternaries 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Frustum.add (cognitive 22) src/core/shape/frustum.js:245— Frustum.add has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 2 (10 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ply.readCompressedPly (cognitive 22) src/framework/parsers/ply.js:251— ply.readCompressedPly has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 4 (8 pts) (nesting depth added 12). Of this number, 17 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Atlas.upload (cognitive 22) src/framework/font/canvas-font.js:61— Atlas.upload has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (10 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebglGraphicsDevice.setTextureParameters (cognitive 22) src/platform/graphics/webgl/webgl-graphics-device.js:1888— WebglGraphicsDevice.setTextureParameters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebglGraphicsDevice.setBlendState (cognitive 22) src/platform/graphics/webgl/webgl-graphics-device.js:2966— WebglGraphicsDevice.setBlendState has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 12). Of this number, 19 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Lightmapper.renderShadowMap (cognitive 22) src/framework/lightmapper/lightmapper.js:832— Lightmapper.renderShadowMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchManager.generate (cognitive 22) src/scene/batching/batch-manager.js:402— BatchManager.generate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpriteComponent.clips (cognitive 22) src/framework/components/sprite/component.js:459— SpriteComponent.clips has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpriteComponentSystem.initializeComponentData (cognitive 22) src/framework/components/sprite/system.js:152— SpriteComponentSystem.initializeComponentData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
glb-parser.createVertexBufferInternal (cognitive 22) src/framework/parsers/glb-parser.js:224— glb-parser.createVertexBufferInternal has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 6 (10 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CameraGizmo._draw (cognitive 22) src/extras/gizmo/handle/camera-gizmo.js:74— CameraGizmo._draw has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (6 pts), loops 4, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
clear (cognitive 22) src/platform/graphics/webgl/webgl-graphics-device.js:2369— clear has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), other 4, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_parseAssets (cognitive 22) src/framework/app-base.js:1017— _parseAssets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (8 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loadBuffers (cognitive 22) src/framework/parsers/glb-parser.js:1577— loadBuffers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 1 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1609, 1586, 1595, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
_createProjectorCompute (cognitive 22) src/scene/gsplat-unified/gsplat-projector.js:400— _createProjectorCompute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 7, other 3, boolean chains 1 (nesting depth added 1). Of this number, 19 points are the body's own statements and 3 belong to 12 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_cullEntry (cognitive 22) src/scene/gsplat-unified/gsplat-shadow-renderer.js:548— _cullEntry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 2 (3 pts), ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
onEnable (cognitive 22) src/framework/components/collision/component.js:807— onEnable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity· get (cognitive 22) · ×1
get (cognitive 22) src/platform/graphics/webgpu/webgpu-render-pipeline.js:202— get has cognitive complexity 22 (threshold 15). Drivers by points: other 7, if/else 4 (6 pts), ternaries 6, loops 2 (3 pts) (nesting depth added 3). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
resolve (cognitive 22) src/platform/graphics/webgl/webgl-render-target.js:467— resolve has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatFlipbook.getNextFrameNumberFromLast (cognitive 21) scripts/esm/gsplat/gsplat-flipbook.mjs:322— GSplatFlipbook.getNextFrameNumberFromLast has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatText._rebuildFromText (cognitive 21) scripts/esm/gsplat/gsplat-text.mjs:131— GSplatText._rebuildFromText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 3 (4 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlockAllocator._findFreeBlock (cognitive 21) src/core/block-allocator.js:382— BlockAllocator._findFreeBlock has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BoundingBox.computeMinMax (cognitive 21) src/core/shape/bounding-box.js:438— BoundingBox.computeMinMax has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RenderPassForward.updateClears (cognitive 21) src/scene/renderer/render-pass-forward.js:354— RenderPassForward.updateClears has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatProjector.dispatch (cognitive 21) src/scene/gsplat-unified/gsplat-projector.js:643— GSplatProjector.dispatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2 (3 pts), ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
GSplatManager.update (cognitive 21) src/scene/gsplat-unified/gsplat-manager.js:656— GSplatManager.update has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1, ternaries 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraComponentSystem.initializeComponentData (cognitive 21) src/framework/components/camera/system.js:104— CameraComponentSystem.initializeComponentData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RenderComponent.materialAssets (cognitive 21) src/framework/components/render/component.js:784— RenderComponent.materialAssets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XrInputSource.update (cognitive 21) src/framework/xr/xr-input-source.js:462— XrInputSource.update has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextureHandler._getTextureOptions (cognitive 21) src/framework/handlers/texture.js:206— TextureHandler._getTextureOptions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (21 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetRegistry.load (cognitive 21) src/framework/asset/asset-registry.js:462— AssetRegistry.load has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20 (37 pts), boolean chains 9, loops 2 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AssetRegistry.load::_opened) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AnimController._transitionHasConditionsMet (cognitive 21) src/framework/anim/controller/anim-controller.js:313— AnimController._transitionHasConditionsMet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnimationComponent.assets (cognitive 21) src/framework/components/animation/component.js:172— AnimationComponent.assets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), ternaries 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
initFromGpuDevice (cognitive 21) src/platform/graphics/webgpu/webgpu-graphics-device.js:778— initFromGpuDevice has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9, boolean chains 5, if/else 3 (4 pts), other 3 (nesting depth added 1). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
createNodes (cognitive 21) src/framework/parsers/glb-parser.js:1123— createNodes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 1, other 1 (nesting depth added 10). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
buildResourceFormats (cognitive 21) REDACTED:869— buildResourceFormats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (6 pts), boolean chains 4, loops 1, other 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
writeNodes (cognitive 21) src/extras/exporters/gltf-exporter.js:778— writeNodes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3 (nesting depth added 9). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 780, 808, 822). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
_resolveEntityScriptAttribute (cognitive 21) src/framework/components/script/component.js:615— _resolveEntityScriptAttribute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (7 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindGroup._revalidate (cognitive 20) src/platform/graphics/bind-group.js:350— BindGroup._revalidate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (6 pts), boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StandardMaterialMapTransforms.update (cognitive 20) src/scene/materials/standard-material-map-transforms.js:182— StandardMaterialMapTransforms.update has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MeshInstance.getMaterialBindGroup (cognitive 20) src/scene/mesh-instance.js:1953— MeshInstance.getMaterialBindGroup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 4). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
WebglGraphicsDevice._multiDrawLoopFallback (cognitive 20) src/platform/graphics/webgl/webgl-graphics-device.js:2092— WebglGraphicsDevice._multiDrawLoopFallback has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 6 (8 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
basis.basisInitialize (cognitive 20) src/framework/handlers/basis.js:274— basis.basisInitialize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 4). Of this number, 14 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TextureAtlasHandler._onAssetChange (cognitive 20) src/framework/handlers/texture-atlas.js:186— TextureAtlasHandler._onAssetChange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ScriptAttributes.add (cognitive 20) src/framework/script/script-attributes.js:325— ScriptAttributes.add has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 350). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
WireRenderer._writePoints (cognitive 20) src/extras/renderers/wire-renderer.js:344— WireRenderer._writePoints has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 5 (6 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebgpuBindGroup.createDescriptor (cognitive 20) src/platform/graphics/webgpu/webgpu-bind-group.js:74— WebgpuBindGroup.createDescriptor has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 5). None of this is in the body itself: all 20 points belong to 5 function literals inside it that branch (lines 121, 107, 163, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WebgpuXrBridge.beginFrame (cognitive 20) src/platform/graphics/webgpu/webgpu-xr-bridge.js:58— WebgpuXrBridge.beginFrame has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
init (cognitive 20) src/framework/app-base.js:573— init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 6, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
getRenderableHdrFormat (cognitive 20) src/platform/graphics/graphics-device.js:1963— getRenderableHdrFormat has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
applySettings (cognitive 20) src/scene/gsplat-unified/gsplat-params.js:1118— applySettings has cognitive complexity 20 (threshold 15). Drivers by points: other 20. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initColor (cognitive 20) src/platform/graphics/webgpu/webgpu-render-target.js:479— initColor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (4 pts), boolean chains 2, other 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_execute (cognitive 20) src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:454— _execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (7 pts), loops 1, other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getRenderInfo (cognitive 20) src/scene/gsplat-unified/gsplat-work-buffer.js:247— getRenderInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (4 pts), boolean chains 1, loops 1, other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_intersectsRay (cognitive 20) src/core/shape/bounding-box.js:185— _intersectsRay has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnnotationManager.initialize (cognitive 19) scripts/esm/annotations.mjs:812— AnnotationManager.initialize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (prerenderHandler, a function literal at line 918, createLayer, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Tags._has (cognitive 19) src/core/tags.js:209— Tags._has has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Shader.constructor (cognitive 19) src/platform/graphics/shader.js:194— Shader.constructor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphicsDevice.initCapsDefines (cognitive 19) src/platform/graphics/graphics-device.js:886— GraphicsDevice.initCapsDefines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GSplatResource.updateSHData (cognitive 19) src/scene/gsplat/gsplat-resource.js:175— GSplatResource.updateSHData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ply.readGeneralPly (cognitive 19) src/framework/parsers/ply.js:392— ply.readGeneralPly has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 11). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ComponentSystem.initializeComponentData (cognitive 19) src/framework/components/system.js:160— ComponentSystem.initializeComponentData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelComponent.model (cognitive 19) src/framework/components/model/component.js:354— ModelComponent.model has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XrView._updateDepth (cognitive 19) src/framework/xr/xr-view.js:278— XrView._updateDepth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
XrManager.update (cognitive 19) src/framework/xr/xr-manager.js:1024— XrManager.update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ext-mesh-gpu-instancing.createInstancing (cognitive 19) src/framework/parsers/glb/extensions/ext-mesh-gpu-instancing.js:9— ext-mesh-gpu-instancing.createInstancing has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 9). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 12). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
GlbContainerResource.createModel (cognitive 19) src/framework/parsers/glb-container-resource.js:312— GlbContainerResource.createModel has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), ternaries 1 (nesting depth added 10). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dynamic-sky-noise.createNoiseTexture (cognitive 19) src/extras/effects/dynamic-sky/dynamic-sky-noise.js:131— dynamic-sky-noise.createNoiseTexture has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 2 (3 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
UsdzExporter.buildMaterial (cognitive 19) src/extras/exporters/usdz-exporter.js:425— UsdzExporter.buildMaterial has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 5 (8 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (addTexture). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
RotateGizmo._drag (cognitive 19) src/extras/gizmo/transform/rotate-gizmo.js:657— RotateGizmo._drag has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (14 pts), if/else 1 (2 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OutlineRenderer.getMeshInstances (cognitive 19) src/extras/renderers/outline-renderer.js:301— OutlineRenderer.getMeshInstances has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 3 (5 pts), boolean chains 4 (nesting depth added 8). Of this number, 11 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graphics-device-create.createGraphicsDevice (cognitive 19) src/platform/graphics/graphics-device-create.js:93— graphics-device-create.createGraphicsDevice has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
layers (cognitive 19) src/framework/components/element/component.js:721— layers has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
_showReadout (cognitive 19) src/extras/gizmo/transform/transform-gizmo.js:620— _showReadout has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (6 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_draw (cognitive 19) src/extras/renderers/texture-renderer.js:292— _draw has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, ternaries 2 (4 pts), other 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatImage._rebuildFromImage (cognitive 18) scripts/esm/gsplat/gsplat-image.mjs:89— GSplatImage._rebuildFromImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatLines.postUpdate (cognitive 18) scripts/esm/gsplat/gsplat-lines.mjs:333— GSplatLines.postUpdate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (7 pts), ternaries 1 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LightsBuffer.addLightData (cognitive 18) src/scene/lighting/lights-buffer.js:194— LightsBuffer.addLightData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
layout-calculator.createCalculator::calculateSizesOnAxisB (cognitive 18) src/framework/components/layout-group/layout-calculator.js:202— layout-calculator.createCalculator::calculateSizesOnAxisB has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebglShader.link (cognitive 18) src/platform/graphics/webgl/webgl-shader.js:147— WebglShader.link has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchManager._collectAndRemoveMeshInstances (cognitive 18) src/scene/batching/batch-manager.js:363— BatchManager._collectAndRemoveMeshInstances has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 3 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
JobQueue.init (cognitive 18) src/framework/parsers/draco-decoder.js:30— JobQueue.init has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, loops 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 32, 31). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
draco-decoder.initializeWorkers (cognitive 18) src/framework/parsers/draco-decoder.js:171— draco-decoder.initializeWorkers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (5 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScriptHandler._loadModule (cognitive 18) src/framework/handlers/script.js:120— ScriptHandler._loadModule has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 1 (nesting depth added 9). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 135). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
AnimComponent.loadAnimationAssets (cognitive 18) src/framework/components/anim/component.js:481— AnimComponent.loadAnimationAssets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PostEffectQueue.removeEffect (cognitive 18) src/framework/components/camera/post-effect-queue.js:177— PostEffectQueue.removeEffect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebgpuGraphicsDevice.createDevice (cognitive 18) src/platform/graphics/webgpu/webgpu-graphics-device.js:640— WebgpuGraphicsDevice.createDevice has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frameStart (cognitive 18) src/platform/graphics/graphics-device.js:1838— frameStart has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), other 5, ternaries 1 (2 pts) (nesting depth added 3). None of this is in the body itself: all 18 points belong to 7 function items inside it that branch (a function literal at line 1860, a function literal at line 1884, a function literal at line 1842, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
frameUpdate (cognitive 18) src/extras/effects/dynamic-sky/dynamic-sky-effect.js:1485— frameUpdate has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, loops 2 (5 pts), if/else 3, other 1, ternaries 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
renderForwardPrepareMaterials (cognitive 18) src/scene/renderer/forward-renderer.js:207— renderForwardPrepareMaterials has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, other 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity· type (cognitive 18) · ×1
type (cognitive 18) src/framework/components/sprite/component.js:297— type has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_updateTexOptions (cognitive 18) src/scene/materials/standard-material-options-builder.js:146— _updateTexOptions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_updateMaterialOptions (cognitive 18) src/scene/materials/standard-material-options-builder.js:220— _updateMaterialOptions has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 17, ternaries 1. Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
GSplatOctree.flushRequests (cognitive 17) src/scene/gsplat-unified/gsplat-octree.js:629— GSplatOctree.flushRequests has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatVaryings._generateChunks (cognitive 17) src/scene/gsplat-unified/gsplat-varyings.js:233— GSplatVaryings._generateChunks has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), loops 2 (4 pts), if/else 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatWorld.reconcile (cognitive 17) src/scene/gsplat-unified/gsplat-world.js:381— GSplatWorld.reconcile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatLayerData.updateConfiguration (cognitive 17) src/scene/gsplat-unified/gsplat-director.js:79— GSplatLayerData.updateConfiguration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (6 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ammo-physics-shape.getTriMesh (cognitive 17) src/framework/physics/ammo/ammo-physics-shape.js:66— ammo-physics-shape.getTriMesh has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (7 pts), loops 1 (2 pts) (nesting depth added 8). Of this number, 11 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MouseEvent.constructor (cognitive 17) src/platform/input/mouse-event.js:119— MouseEvent.constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AssetRegistry.load::_opened (cognitive 17) src/framework/asset/asset-registry.js:482— AssetRegistry.load::_opened has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AssetRegistry.load) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
DynamicSkyEffect._createLightingTargets (cognitive 17) src/extras/effects/dynamic-sky/dynamic-sky-effect.js:1560— DynamicSkyEffect._createLightingTargets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (7 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GltfExporter.collectResources (cognitive 17) src/extras/exporters/gltf-exporter.js:179— GltfExporter.collectResources has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (nesting depth added 3). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 208, 258, 216). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
usdz-exporter.skinVertices (cognitive 17) src/extras/exporters/usdz-exporter.js:40— usdz-exporter.skinVertices has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (7 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CapsuleGizmo._drawShapes (cognitive 17) src/extras/gizmo/handle/capsule-gizmo.js:95— CapsuleGizmo._drawShapes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (6 pts), loops 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
outlineColor (cognitive 17) src/framework/components/element/text-element.js:2095— outlineColor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4, boolean chains 3, loops 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
destroy (cognitive 17) src/framework/app-base.js:1829— destroy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_prepareUniformBuffer (cognitive 17) src/scene/materials/material.js:1224— _prepareUniformBuffer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (4 pts), boolean chains 3, other 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
writeMaterials (cognitive 17) src/extras/exporters/gltf-exporter.js:736— writeMaterials has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 739). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
setupScenePass (cognitive 17) src/extras/render-passes/frame-pass-camera-frame.js:729— setupScenePass has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 2, other 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateSubStat (cognitive 17) src/extras/mini-stats/mini-stats.js:944— updateSubStat has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_writeLine (cognitive 17) src/extras/renderers/wide-line-renderer.js:948— _writeLine has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 2, if/else 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sort (cognitive 17) src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:452— sort has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 2 (3 pts), boolean chains 2, loops 1, other 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sortIndirect (cognitive 17) src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:574— sortIndirect has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 2 (3 pts), boolean chains 2, loops 1, other 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stripUnusedColorAttachments (cognitive 17) REDACTED:126— stripUnusedColorAttachments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 1 (3 pts), boolean chains 1, other 1 (nesting depth added 10). Of this number, 16 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
calcSpawnPosition (cognitive 17) src/scene/particle-system/cpu-updater.js:40— calcSpawnPosition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (8 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createShader (cognitive 17) src/scene/shader-lib/shader-utils.js:93— createShader has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 4, if/else 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatTrees._rebuild (cognitive 16) scripts/esm/gsplat/gsplat-trees.mjs:348— GSplatTrees._rebuild has cognitive complexity 16 (threshold 15). Drivers by points: loops 9 (13 pts), if/else 2, boolean chains 1 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MeshInstanceStorage._uploadDirtySlots (cognitive 16) src/platform/graphics/mesh-instance-storage.js:213— MeshInstanceStorage._uploadDirtySlots has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StandardMaterialMapTransforms._updateIds (cognitive 16) src/scene/materials/standard-material-map-transforms.js:300— StandardMaterialMapTransforms._updateIds has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SphereGeometry.constructor (cognitive 16) src/scene/geometry/sphere-geometry.js:55— SphereGeometry.constructor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GSplatWorldState.applyAllocations (cognitive 16) src/scene/gsplat-unified/gsplat-world-state.js:214— GSplatWorldState.applyAllocations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageRenderable.setUnmaskDrawOrder (cognitive 16) src/framework/components/element/image-element.js:166— ImageRenderable.setUnmaskDrawOrder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (getLastChild). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ImageElement.texture (cognitive 16) src/framework/components/element/image-element.js:1142— ImageElement.texture has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetReference._bind (cognitive 16) src/framework/asset/asset-reference.js:161— AssetReference._bind has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RenderComponent.rootBone (cognitive 16) src/framework/components/render/component.js:886— RenderComponent.rootBone has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebglVertexBuffer.deleteVertexArrays (cognitive 16) src/platform/graphics/webgl/webgl-vertex-buffer.js:139— WebglVertexBuffer.deleteVertexArrays has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebglGpuProfiler.request (cognitive 16) src/platform/graphics/webgl/webgl-gpu-profiler.js:130— WebglGpuProfiler.request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lightmapper.postprocessTextures (cognitive 16) src/framework/lightmapper/lightmapper.js:883— Lightmapper.postprocessTextures has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (8 pts), loops 3 (6 pts), boolean chains 1, if/else 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoundComponentSystem.onUpdate (cognitive 16) src/framework/components/sound/system.js:142— SoundComponentSystem.onUpdate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LensFlareShapes._normalize (cognitive 16) src/extras/effects/lens-flare/lens-flare-shapes.js:149— LensFlareShapes._normalize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CylinderGizmo._drawShapes (cognitive 16) src/extras/gizmo/handle/cylinder-gizmo.js:76— CylinderGizmo._drawShapes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (6 pts), loops 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RotateGizmo._setNodeRotations (cognitive 16) src/extras/gizmo/transform/rotate-gizmo.js:700— RotateGizmo._setNodeRotations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WordAtlas.constructor (cognitive 16) src/extras/mini-stats/word-atlas.js:6— WordAtlas.constructor has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 2 (6 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ResourceLine.equals (cognitive 16) REDACTED:399— ResourceLine.equals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
shadowColor (cognitive 16) src/framework/components/element/text-element.js:2176— shadowColor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4, boolean chains 3, loops 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
setTheme (cognitive 16) src/extras/gizmo/transform/transform-gizmo.js:928— setTheme has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4, boolean chains 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
add::set (cognitive 16) src/framework/script/script-attributes.js:350— add::set has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change coupling clique: vec2.js, vec3.js, vec4.js src/core/math/vec2.js— 3 files — `src/core/math/vec2.js`, `src/core/math/vec3.js`, `src/core/math/vec4.js` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
End-of-life runtime: Node.js 18 .nvmrc:1— .nvmrc declares Node.js 18 as this project's version file, and Node.js 18, support ended 2025-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2025-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
Duplication concentrated across 6 sibling directories (74 clone groups) src/framework/components/gsplat/component.js:423— 74 duplicated blocks under src/ have copies in at least two of the sibling directories core, deprecated, extras, framework, platform, scene — 22 of them are reported below, and 52 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 74 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 74 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 74 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 23 sibling directories (63 clone groups) src/framework/components/model/component.js:158— 63 duplicated blocks under src/framework/components/ have copies in at least two of the sibling directories anim, animation, audio-listener, button, camera, collision (+17 more sibling(s) not listed) — 48 of them are reported below, and 15 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 63 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 63 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 63 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 2 sibling directories (36 clone groups) scripts/esm/parsers/obj-model.mjs:31— 36 duplicated blocks under the repository root have copies in at least two of the sibling directories scripts, src — 15 of them are reported below, and 21 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 36 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 36 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 36 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 13 sibling directories (22 clone groups) src/extras/effects/auto-exposure/passes/render-pass-histogram-step.js:43— 22 duplicated blocks under src/extras/effects/ have copies in at least two of the sibling directories auto-exposure, bloom, cas, color-enhance, dof, fringing (+7 more sibling(s) not listed) — 11 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 22 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 11 sibling directories (17 clone groups) src/scene/gsplat-unified/gsplat-params.js:957— 17 duplicated blocks under src/scene/ have copies in at least two of the sibling directories composition, geometry, graphics, gsplat, gsplat-unified, lighting (+5 more sibling(s) not listed) — 9 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 17 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 17 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 17 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 9 sibling directories (10 clone groups) src/framework/anim/evaluator/anim-target.js:48— 10 duplicated blocks under src/framework/ have copies in at least two of the sibling directories anim, asset, components, gsplat, handlers, i18n (+3 more sibling(s) not listed) — 6 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 10 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 3 sibling directories (5 clone groups) src/platform/graphics/webgl/webgl-xr-bridge.js:265— 5 duplicated blocks under src/platform/graphics/ have copies in at least two of the sibling directories null, webgl, webgpu — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (257 matched lines × 2 locations) · ×1
Duplicated block with local edits (257 matched lines × 2 locations) src/extras/gizmo/transform/scale-gizmo.js:20— src/extras/gizmo/transform/scale-gizmo.js:20 · src/extras/gizmo/transform/translate-gizmo.js:22 — the two spans are one implementation copied and then locally edited — 1964 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (243 matched lines × 2 locations) · ×1
Duplicated block with local edits (243 matched lines × 2 locations) src/framework/components/model/component.js:158— src/framework/components/model/component.js:158 · src/framework/components/render/component.js:207 — the two spans are one implementation copied and then locally edited — 1535 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (216 matched lines × 2 locations) · ×1
Duplicated block with local edits (216 matched lines × 2 locations) scripts/esm/first-person-controller.mjs:24— scripts/esm/first-person-controller.mjs:24 · scripts/esm/third-person-controller.mjs:24 — the two spans are one implementation copied and then locally edited — 1839 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (170 identical lines × 2 files) src/scene/shader-lib/glsl/collections/shader-chunks-glsl.js:1— src/scene/shader-lib/glsl/collections/shader-chunks-glsl.js:1 · src/scene/shader-lib/wgsl/collections/shader-chunks-wgsl.js:1 — these 2 files are line-for-line copies of one another — 170 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (136 matched lines × 2 locations) · ×1
Duplicated block with local edits (136 matched lines × 2 locations) src/core/math/vec3.js:108— src/core/math/vec3.js:108 · src/core/math/vec4.js:111 — the two spans are one implementation copied and then locally edited — 1178 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (108 matched lines × 2 locations) · ×1
Duplicated block with local edits (108 matched lines × 2 locations) scripts/esm/gsplat/gsplat-image.mjs:32— scripts/esm/gsplat/gsplat-image.mjs:32 · scripts/esm/gsplat/gsplat-text.mjs:74 — the two spans are one implementation copied and then locally edited — 779 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (88 matched lines × 2 locations) · ×1
Duplicated block with local edits (88 matched lines × 2 locations) src/extras/gizmo/shape/arrow-shape.js:15— src/extras/gizmo/shape/arrow-shape.js:15 · src/extras/gizmo/shape/boxline-shape.js:15 — the two spans are one implementation copied and then locally edited — 662 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (87 matched lines × 2 locations) · ×1
Duplicated block with local edits (87 matched lines × 2 locations) src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:116— src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:116 · src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog.js:83 — the two spans are one implementation copied and then locally edited — 725 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (85 matched lines × 2 locations) · ×1
Duplicated block with local edits (85 matched lines × 2 locations) src/platform/graphics/webgl/webgl-texture.js:540— src/platform/graphics/webgl/webgl-texture.js:540 · src/platform/graphics/webgl/webgl-texture.js:763 — the two spans are one implementation copied and then locally edited — 412 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (83 matched lines × 2 locations) · ×1
Duplicated block with local edits (83 matched lines × 2 locations) src/framework/parsers/sog-bundle.js:141— src/framework/parsers/sog-bundle.js:141 · src/framework/parsers/sog.js:81 — the two spans are one implementation copied and then locally edited — 531 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (70 matched lines × 2 locations) · ×1
Duplicated block with local edits (70 matched lines × 2 locations) scripts/spine/playcanvas-spine.4.3.js:10327— scripts/spine/playcanvas-spine.4.3.js:10327 · scripts/spine/playcanvas-spine.4.3.js:10473 — the two spans are one implementation copied and then locally edited — 595 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (67 matched lines × 2 locations) · ×1
Duplicated block with local edits (67 matched lines × 2 locations) src/scene/gsplat-unified/gsplat-hybrid-renderer.js:118— src/scene/gsplat-unified/gsplat-hybrid-renderer.js:118 · src/scene/gsplat-unified/gsplat-quad-renderer.js:32 — the two spans are one implementation copied and then locally edited — 383 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (66 matched lines × 2 locations) · ×1
Duplicated block with local edits (66 matched lines × 2 locations) src/scene/light.js:571— src/scene/light.js:571 · src/scene/light.js:790 — the two spans are one implementation copied and then locally edited — 280 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (65 matched lines × 2 locations) · ×1
Duplicated block with local edits (65 matched lines × 2 locations) src/extras/gizmo/handle/cone-gizmo.js:19— src/extras/gizmo/handle/cone-gizmo.js:19 · src/extras/gizmo/handle/cylinder-gizmo.js:21 — the two spans are one implementation copied and then locally edited — 591 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (61 lines × 2 locations) src/framework/components/button/system.js:23— src/framework/components/button/system.js:23 · src/framework/components/scroll-view/system.js:27 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (60 matched lines × 2 locations) · ×1
Duplicated block with local edits (60 matched lines × 2 locations) src/extras/input/sources/dual-gesture-source.js:165— src/extras/input/sources/dual-gesture-source.js:165 · src/extras/input/sources/single-gesture-source.js:126 — the two spans are one implementation copied and then locally edited — 395 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (57 matched lines × 2 locations) · ×1
Duplicated block with local edits (57 matched lines × 2 locations) src/framework/components/rigid-body/component.js:205— src/framework/components/rigid-body/component.js:205 · src/framework/components/rigid-body/component.js:403 — the two spans are one implementation copied and then locally edited — 283 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (52 lines × 2 locations) scripts/posteffects/posteffect-brightnesscontrast.js:37— scripts/posteffects/posteffect-brightnesscontrast.js:37 · scripts/posteffects/posteffect-huesaturation.js:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (49 matched lines × 2 locations) · ×1
Duplicated block with local edits (49 matched lines × 2 locations) src/core/math/quat.js:36— src/core/math/quat.js:36 · src/core/math/vec4.js:25 — the two spans are one implementation copied and then locally edited — 347 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (48 lines × 2 locations) src/platform/graphics/index-buffer.js:98— src/platform/graphics/index-buffer.js:98 · src/platform/graphics/vertex-buffer.js:77 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (47 matched lines × 2 locations) · ×1
Duplicated block with local edits (47 matched lines × 2 locations) src/extras/gizmo/handle/capsule-gizmo.js:20— src/extras/gizmo/handle/capsule-gizmo.js:20 · src/extras/gizmo/handle/cylinder-gizmo.js:15 — the two spans are one implementation copied and then locally edited — 458 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (44 matched lines × 2 locations) · ×1
Duplicated block with local edits (44 matched lines × 2 locations) src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:20— src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:20 · src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:20 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (42 matched lines × 2 locations) · ×1
Duplicated block with local edits (42 matched lines × 2 locations) scripts/posteffects/posteffect-blend.js:46— scripts/posteffects/posteffect-blend.js:46 · scripts/posteffects/posteffect-outline.js:74 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (42 lines × 2 locations) src/framework/components/model/system.js:32— src/framework/components/model/system.js:32 · src/framework/components/render/system.js:35 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (40 matched lines × 2 locations) · ×1
Duplicated block with local edits (40 matched lines × 2 locations) scripts/spine/playcanvas-spine.4.3.js:3129— scripts/spine/playcanvas-spine.4.3.js:3129 · scripts/spine/playcanvas-spine.4.3.js:3347 — the two spans are one implementation copied and then locally edited — 352 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (39 matched lines × 2 locations) · ×1
Duplicated block with local edits (39 matched lines × 2 locations) src/framework/xr/xr-mesh-detection.js:28— src/framework/xr/xr-mesh-detection.js:28 · src/framework/xr/xr-plane-detection.js:28 — the two spans are one implementation copied and then locally edited — 239 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (38 matched lines × 2 locations) · ×1
Duplicated block with local edits (38 matched lines × 2 locations) src/extras/input/sources/dual-gesture-source.js:88— src/extras/input/sources/dual-gesture-source.js:88 · src/extras/input/sources/single-gesture-source.js:54 — the two spans are one implementation copied and then locally edited — 239 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function readAnimation (cyclomatic 132, cognitive 418) scripts/spine/playcanvas-spine.4.3.js:12850— readAnimation has cyclomatic complexity 132 and cognitive complexity 418; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readAnimation (cyclomatic 118, cognitive 291) scripts/spine/playcanvas-spine.4.3.js:10183— readAnimation has cyclomatic complexity 118 and cognitive complexity 291; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readSkeletonData (cyclomatic 106, cognitive 220) scripts/spine/playcanvas-spine.4.3.js:9557— readSkeletonData has cyclomatic complexity 106 and cognitive complexity 220; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readSkeletonData (cyclomatic 101, cognitive 290) scripts/spine/playcanvas-spine.4.3.js:12237— readSkeletonData has cyclomatic complexity 101 and cognitive complexity 290; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function initializeComponentData (cyclomatic 85, cognitive 130) src/framework/components/element/system.js:107— initializeComponentData has cyclomatic complexity 85 and cognitive complexity 130; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _updateMeshes (cyclomatic 84, cognitive 223) src/framework/components/element/text-element.js:864— _updateMeshes has cyclomatic complexity 84 and cognitive complexity 223; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function upload (cyclomatic 80, cognitive 212) src/platform/graphics/webgl/webgl-texture.js:481— upload has cyclomatic complexity 80 and cognitive complexity 212; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function constructor (cyclomatic 74, cognitive 84) src/platform/graphics/render-target.js:388— constructor has cyclomatic complexity 74 and cognitive complexity 84; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function writeStandardMaterial (cyclomatic 60, cognitive 83) src/extras/exporters/gltf-exporter.js:491— writeStandardMaterial has cyclomatic complexity 60 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _updateText (cyclomatic 58, cognitive 123) src/framework/components/element/text-element.js:376— _updateText has cyclomatic complexity 58 and cognitive complexity 123; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _validateCopy (cyclomatic 57, cognitive 43) src/platform/graphics/texture.js:1507— _validateCopy has cyclomatic complexity 57 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rawToValue (cyclomatic 56, cognitive 106) src/framework/script/script-attributes.js:20— rawToValue has cyclomatic complexity 56 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function cullShadowCastersOmni (cyclomatic 55, cognitive 54) src/scene/renderer/shadow-renderer.js:302— cullShadowCastersOmni has cyclomatic complexity 55 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function update (cyclomatic 50, cognitive 160) scripts/spine/playcanvas-spine.4.3.js:8364— update has cyclomatic complexity 50 and cognitive complexity 160; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _preprocess (cyclomatic 45, cognitive 113) REDACTED:232— _preprocess has cyclomatic complexity 45 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function update (cyclomatic 45, cognitive 105) src/scene/particle-system/cpu-updater.js:98— update has cyclomatic complexity 45 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function validate (cyclomatic 43, cognitive 94) src/scene/materials/standard-material-validator.js:72— validate has cyclomatic complexity 43 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function constructor (cyclomatic 43, cognitive 44) src/platform/graphics/texture.js:295— constructor has cyclomatic complexity 43 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createShaderDefinition (cyclomatic 42, cognitive 82) src/scene/shader-lib/programs/standard.js:355— createShaderDefinition has cyclomatic complexity 42 and cognitive complexity 82; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· src/platform/graphics/webgl/webgl-graphics-device.js · ×1
src/platform/graphics/webgl/webgl-graphics-device.js: 2813 lines of code src/platform/graphics/webgl/webgl-graphics-device.js:1— src/platform/graphics/webgl/webgl-graphics-device.js has 2813 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/element/component.js · ×1
src/framework/components/element/component.js: 2610 lines of code src/framework/components/element/component.js:1— src/framework/components/element/component.js has 2610 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/scene/materials/standard-material.js · ×1
src/scene/materials/standard-material.js: 2325 lines of code src/scene/materials/standard-material.js:1— src/scene/materials/standard-material.js has 2325 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/platform/graphics/constants.js · ×1
src/platform/graphics/constants.js: 2165 lines of code src/platform/graphics/constants.js:1— src/platform/graphics/constants.js has 2165 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/particle-system/component.js · ×1
src/framework/components/particle-system/component.js: 2096 lines of code src/framework/components/particle-system/component.js:1— src/framework/components/particle-system/component.js has 2096 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/element/text-element.js · ×1
src/framework/components/element/text-element.js: 2018 lines of code src/framework/components/element/text-element.js:1— src/framework/components/element/text-element.js has 2018 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/platform/graphics/webgpu/webgpu-graphics-device.js · ×1
src/platform/graphics/webgpu/webgpu-graphics-device.js: 1883 lines of code src/platform/graphics/webgpu/webgpu-graphics-device.js:1— src/platform/graphics/webgpu/webgpu-graphics-device.js has 1883 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/framework/app-base.js: 1854 lines of code src/framework/app-base.js:1— src/framework/app-base.js has 1854 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/scene/mesh-instance.js: 1835 lines of code src/scene/mesh-instance.js:1— src/scene/mesh-instance.js has 1835 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/platform/graphics/graphics-device.js · ×1
src/platform/graphics/graphics-device.js: 1812 lines of code src/platform/graphics/graphics-device.js:1— src/platform/graphics/graphics-device.js has 1812 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/scene/graph-node.js: 1676 lines of code src/scene/graph-node.js:1— src/scene/graph-node.js has 1676 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/extras/effects/dynamic-sky/dynamic-sky-effect.js · ×1
src/extras/effects/dynamic-sky/dynamic-sky-effect.js: 1604 lines of code src/extras/effects/dynamic-sky/dynamic-sky-effect.js:1— src/extras/effects/dynamic-sky/dynamic-sky-effect.js has 1604 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/parsers/glb-parser.js · ×1
src/framework/parsers/glb-parser.js: 1589 lines of code src/framework/parsers/glb-parser.js:1— src/framework/parsers/glb-parser.js has 1589 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/platform/graphics/texture.js · ×1
src/platform/graphics/texture.js: 1508 lines of code src/platform/graphics/texture.js:1— src/platform/graphics/texture.js has 1508 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/scene/materials/material.js · ×1
src/scene/materials/material.js: 1498 lines of code src/scene/materials/material.js:1— src/scene/materials/material.js has 1498 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/camera/component.js · ×1
src/framework/components/camera/component.js: 1455 lines of code src/framework/components/camera/component.js:1— src/framework/components/camera/component.js has 1455 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/light/component.js · ×1
src/framework/components/light/component.js: 1403 lines of code src/framework/components/light/component.js:1— src/framework/components/light/component.js has 1403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/scene/constants.js: 1287 lines of code src/scene/constants.js:1— src/scene/constants.js has 1287 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/scene/renderer/renderer.js · ×1
src/scene/renderer/renderer.js: 1265 lines of code src/scene/renderer/renderer.js:1— src/scene/renderer/renderer.js has 1265 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/joint/component.js · ×1
src/framework/components/joint/component.js: 1234 lines of code src/framework/components/joint/component.js:1— src/framework/components/joint/component.js has 1234 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/core/math/mat4.js: 1215 lines of code src/core/math/mat4.js:1— src/core/math/mat4.js has 1215 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1172 lines of code REDACTED:1— REDACTED has 1172 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/rigid-body/component.js · ×1
src/framework/components/rigid-body/component.js: 1152 lines of code src/framework/components/rigid-body/component.js:1— src/framework/components/rigid-body/component.js has 1152 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/element/image-element.js · ×1
src/framework/components/element/image-element.js: 1148 lines of code src/framework/components/element/image-element.js:1— src/framework/components/element/image-element.js has 1148 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/scene/camera.js: 1138 lines of code src/scene/camera.js:1— src/scene/camera.js has 1138 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/scene/gsplat-unified/gsplat-world.js · ×1
src/scene/gsplat-unified/gsplat-world.js: 1133 lines of code src/scene/gsplat-unified/gsplat-world.js:1— src/scene/gsplat-unified/gsplat-world.js has 1133 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/scroll-view/component.js · ×1
src/framework/components/scroll-view/component.js: 1130 lines of code src/framework/components/scroll-view/component.js:1— src/framework/components/scroll-view/component.js has 1130 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/scene/light.js: 1120 lines of code src/scene/light.js:1— src/scene/light.js has 1120 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/model/component.js · ×1
src/framework/components/model/component.js: 1112 lines of code src/framework/components/model/component.js:1— src/framework/components/model/component.js has 1112 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/render/component.js · ×1
src/framework/components/render/component.js: 1105 lines of code src/framework/components/render/component.js:1— src/framework/components/render/component.js has 1105 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/platform/graphics/render-target.js · ×1
src/platform/graphics/render-target.js: 1078 lines of code src/platform/graphics/render-target.js:1— src/platform/graphics/render-target.js has 1078 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/extras/exporters/gltf-exporter.js · ×1
src/extras/exporters/gltf-exporter.js: 1076 lines of code src/extras/exporters/gltf-exporter.js:1— src/extras/exporters/gltf-exporter.js has 1076 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/button/component.js · ×1
src/framework/components/button/component.js: 1070 lines of code src/framework/components/button/component.js:1— src/framework/components/button/component.js has 1070 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/xr/xr-manager.js · ×1
src/framework/xr/xr-manager.js: 1070 lines of code src/framework/xr/xr-manager.js:1— src/framework/xr/xr-manager.js has 1070 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/scene/gsplat-unified/gsplat-params.js · ×1
src/scene/gsplat-unified/gsplat-params.js: 1052 lines of code src/scene/gsplat-unified/gsplat-params.js:1— src/scene/gsplat-unified/gsplat-params.js has 1052 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/scene/scene.js: 1031 lines of code src/scene/scene.js:1— src/scene/scene.js has 1031 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/scene/mesh.js: 1022 lines of code src/scene/mesh.js:1— src/scene/mesh.js has 1022 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/rigid-body/system.js · ×1
src/framework/components/rigid-body/system.js: 1020 lines of code src/framework/components/rigid-body/system.js:1— src/framework/components/rigid-body/system.js has 1020 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/input/element-input.js · ×1
src/framework/input/element-input.js: 1020 lines of code src/framework/input/element-input.js:1— src/framework/input/element-input.js has 1020 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/framework/components/script/component.js · ×1
src/framework/components/script/component.js: 1013 lines of code src/framework/components/script/component.js:1— src/framework/components/script/component.js has 1013 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~422 LoC) examples/utils/generate-ui-atlas.mjs— no import path from any entry point (146 application, 12 tooling, 334 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~47 LoC) examples/src/app/events.js— no import path from any entry point (146 application, 12 tooling, 334 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'esbuild-visualizer' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×1
Recursive walk over a caller-supplied document has no depth cap src/core/core.js:42— `extend` is exported and takes `ex: object` from its caller, and it calls itself at line 42 (`extend`) with a piece of `ex` (and at line 44) — and nowhere in `extend` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `extend` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Swallowed exception (caught, then discarded) src/framework/xr/xr-anchors.js:457— `catch (ex)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Duplicated predicate src/platform/graphics/webgl/webgl-graphics-device.js:2967— `!blendState.usesDualSourceBlending || this.supportsDualSourceBlending` appears character-identically in 2 files — src/platform/graphics/webgl/webgl-graphics-device.js, src/platform/graphics/webgpu/webgpu-graphics-device.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/scene/gsplat-unified/gsplat-unified-sort-worker.js:277— `!countBuffer || countBuffer.length !== bucketCount` appears character-identically in 2 files — src/scene/gsplat-unified/gsplat-unified-sort-worker.js, src/scene/gsplat/gsplat-sort-worker.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/framework/components/element/image-element.js:349— `!element._beingInitialized && element.enabled && element.entity.enabled` appears character-identically in 2 files — src/framework/components/element/image-element.js, src/framework/components/element/text-element.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/scene/graphics/frame-pass-color-grab.js:70— `!targetRT || width !== targetRT.width || height !== targetRT.height` appears character-identically in 2 files — src/scene/graphics/frame-pass-color-grab.js, src/scene/graphics/frame-pass-depth-grab.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/scene/gsplat-unified/gsplat-hybrid-renderer.js:901— `!this._internalDefines.has(key) && !sourceMaterial.defines.has(key)` appears character-identically in 2 files — src/scene/gsplat-unified/gsplat-hybrid-renderer.js, src/scene/gsplat-unified/gsplat-quad-renderer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/framework/xr/xr-dom-overlay.js:108— `!this._supported || this._manager.active` appears character-identically in 2 files — src/framework/xr/xr-dom-overlay.js, src/framework/xr/xr-image-tracking.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/framework/parsers/sog-bundle.js:176— `!this.app?.graphicsDevice || this.app.graphicsDevice._destroyed` appears character-identically in 2 files — src/framework/parsers/sog-bundle.js, src/framework/parsers/sog.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/framework/components/render/component.js:560— `!value || value.length <= MAX_CLIP_PLANES` appears character-identically in 3 files — src/framework/components/render/component.js, src/scene/camera.js, src/scene/mesh-instance.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/core/math/quat.js:203— `(Math.abs(this.x - rhs.x) < epsilon) && (Math.abs(this.y - rhs.y) < epsilon) && (Math.abs(this.z - rhs.z) < epsilon) && (Math.abs(this.w - r…` appears character-identically in 2 files — src/core/math/quat.js, src/core/math/vec4.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/platform/graphics/index-buffer.js:189— `Number.isInteger(byteOffset) && byteOffset >= 0 && byteOffset % 4 === 0 && Number.isInteger(byteLength) && byteLength >= 0 && (fullRange || …` appears character-identically in 2 files — src/platform/graphics/index-buffer.js, src/platform/graphics/vertex-buffer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/framework/components/gsplat/system.js:208— `_data.aabbCenter && _data.aabbHalfExtents` appears character-identically in 3 files — src/framework/components/gsplat/system.js, src/framework/components/model/system.js, src/framework/components/render/system.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/framework/components/model/system.js:76— `_data.batchGroupId === null || _data.batchGroupId === undefined` appears character-identically in 2 files — src/framework/components/model/system.js, src/framework/components/render/system.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/framework/components/element/image-element.js:888— `asset && asset.resource !== this._material` appears character-identically in 2 files — src/framework/components/element/image-element.js, src/framework/components/model/component.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/extras/gizmo/transform/scale-gizmo.js:519— `axis.length === 1 && !axis.includes(this._selectedAxis)` appears character-identically in 2 files — src/extras/gizmo/transform/scale-gizmo.js, src/extras/gizmo/transform/translate-gizmo.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/platform/graphics/index-buffer.js:184— `byteOffset !== undefined || byteLength !== undefined` appears character-identically in 2 files — src/platform/graphics/index-buffer.js, src/platform/graphics/vertex-buffer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/platform/graphics/index-buffer.js:188— `byteOffset === 0 && byteLength === this.numBytes` appears character-identically in 2 files — src/platform/graphics/index-buffer.js, src/platform/graphics/vertex-buffer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/scene/renderer/forward-renderer.js:308— `camera.xrActive && camera.xrViews.length` appears character-identically in 2 files — src/scene/renderer/forward-renderer.js, src/scene/renderer/renderer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/scene/gsplat-unified/gsplat-projector.js:458— `colorStream && colorStream.format !== PIXELFORMAT_RGBA16U` appears character-identically in 3 files — src/scene/gsplat-unified/gsplat-projector.js, src/scene/gsplat-unified/gsplat-quad-renderer.js, src/scene/gsplat-unified/gsplat-shadow-renderer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/extras/renderers/outline-renderer.js:27— `component.enabled && component.entity.enabled` appears character-identically in 3 files — src/extras/renderers/outline-renderer.js, src/framework/components/collision/system.js, src/framework/components/system.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/core/wasm-module.js:92— `config.glueUrl || config.wasmUrl || config.fallbackUrl` appears character-identically in 2 files — src/core/wasm-module.js, src/framework/handlers/basis.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/framework/components/element/system.js:213— `data.batchGroupId === undefined || data.batchGroupId === null` appears character-identically in 2 files — src/framework/components/element/system.js, src/framework/components/sprite/system.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/framework/components/element/system.js:215— `data.layers && Array.isArray(data.layers)` appears character-identically in 4 files — src/framework/components/element/system.js, src/framework/components/light/system.js, src/framework/components/particle-system/system.js, src/framework/components/sprite/system.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/platform/graphics/shader-processor-glsl.js:479— `dataType !== TYPE_FLOAT32 && dataType !== TYPE_FLOAT16 && !element.normalize && !element.asInt` appears character-identically in 2 files — src/platform/graphics/shader-processor-glsl.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/platform/graphics/shader-processor-glsl.js:490— `dataType === TYPE_INT8 || dataType === TYPE_INT16 || dataType === TYPE_INT32` appears character-identically in 2 files — src/platform/graphics/shader-processor-glsl.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/platform/graphics/webgl/webgl-texture.js:709— `device._isHTMLElementInterface(mipObject) && device.supportsHtmlTextures` appears character-identically in 2 files — src/platform/graphics/webgl/webgl-texture.js, src/platform/graphics/webgpu/webgpu-texture.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-interval-cull.js:111— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-interval-scatter.js:61— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-project-common.js:104— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-projector-write-indirect-args.js:60— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-projector.js:311— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-shadow-cull.js:142— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-shadow-indirect-args.js:43— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-write-indirect-args.js:85— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/radix-sort/compute-prefix-sum.js:118— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/radix-sort/compute-radix-sort-4bit.js:69— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/radix-sort/compute-radix-sort-reorder.js:114— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/radix-sort/onesweep-binning.js:417— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/radix-sort/onesweep-global-hist.js:193— Nothing imports this binding — it is safe to review for removal.
Unused export 'default' src/scene/shader-lib/wgsl/chunks/radix-sort/onesweep-scan.js:95— Nothing imports this binding — it is safe to review for removal.
Orphaned file src/framework/xr/xr-anchors.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/scene/shader-lib/glsl/chunks/lit/frag/lighting/shadowPCSS.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/framework/xr/xr-mesh-detection.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/framework/anim/evaluator/anim-target-value.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/framework/i18n/utils.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/scene/shader-lib/glsl/chunks/lit/frag/iridescenceDiffraction.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/framework/anim/controller/anim-blend-tree-2d-directional.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/scene/shader-lib/glsl/chunks/particle/frag/particleUpdaterStart.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/framework/anim/controller/anim-blend-tree-2d-cartesian.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Mock-dominated test: renders one shadow for all cameras test/scene/renderer/directional-shadow-bounds.test.mjs:73— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: renders the cascades of each camera without bounds test/scene/renderer/directional-shadow-bounds.test.mjs:86— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: deduplicates repeated requests for the same light and camera test/scene/renderer/directional-shadow-cull-requests.test.mjs:135— This test sets up 3 test doubles (for example `sinon.stub`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: supports direct lightmapper rendering without registering a cull request test/scene/renderer/local-shadow-cull-requests.test.mjs:124— This test sets up 3 test doubles (for example `sinon.spy`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: leaves the state alone for a mesh instance overriding nothing test/scene/renderer/restore-material-overrides.test.mjs:88— This test sets up 3 test doubles (for example `sinon.spy`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 163 significant file(s) lose their only recent owner: src/platform/graphics/webgpu/webgpu-graphics-device.js, src/platform/graphics/graphics-device.js, src/extras/render-passes/frame-pass-camera-frame.js, src/scene/light.js, src/scene/gsplat-unified/gsplat-octree-instance.js, src/framework/lightmapper/lightmapper.js, src/scene/gsplat-unified/gsplat-params.js, src/scene/renderer/forward-renderer.js (+155 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 48 significant file(s) lose their only recent owner: src/framework/components/joint/component.js, src/framework/components/rigid-body/system.js, src/framework/input/element-input.js, src/framework/components/collision/component.js, src/framework/xr/xr-input-source.js, src/framework/physics/ammo/ammo-physics-world.js, src/extras/exporters/usdz-exporter.js, src/framework/physics/physics-world.js (+40 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 6 significant file(s) lose their only recent owner: src/extras/gizmo/transform/rotate-gizmo.js, src/extras/gizmo/transform/scale-gizmo.js, src/extras/gizmo/view-cube.js, src/extras/gizmo/shaders.js, src/extras/gizmo/shape/arc-shape.js, src/extras/gizmo/mesh/mesh-line.js. Pair on, review, or document these before any departure.
Disabled test test/framework/i18n/i18n.test.mjs:592— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test test/framework/i18n/i18n.test.mjs:609— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Deprecated: sourcemap-codec REDACTED:8656— sourcemap-codec 1.4.8 is resolved in REDACTED and is marked deprecated by its publisher: "Please use @jridgewell/sourcemap-codec instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (218 single-owned of 684 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 684 of the 1376 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/extras/effects/dof/wgsl/blur-ps.js.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (273828 LoC, 948 module-visible types across 133 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 9 of 684 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 684 of the 1376 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: src/framework/xr/xr-anchors.js, src/scene/shader-lib/glsl/chunks/lit/frag/lighting/shadowPCSS.js, src/framework/xr/xr-mesh-detection.js, src/framework/anim/evaluator/anim-target-value.js, src/framework/i18n/utils.js, src/scene/shader-lib/glsl/chunks/lit/frag/iridescenceDiffraction.js, src/framework/anim/controller/anim-blend-tree-2d-directional.js, src/scene/shader-lib/glsl/chunks/particle/frag/particleUpdaterStart.js (and 1 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
IC1 · Incompleteness & stubs· Empty method body · ×1
Empty method body src/framework/components/element/image-element.js:717— `_onMaterialChange` has an empty body — confirm it's an intentional no-op and not an unfinished method.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No SAST REDACTED:12— No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/javascript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 23384 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Unused export 'typesFixup' utils/plugins/rollup-types-fixup.mjs:379— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused module-local declaration 'MobileInputLayout' · ×1
Unused module-local declaration 'MobileInputLayout' scripts/esm/camera-controls.mjs:122— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'calculateRequiredSamplesGGX' · ×1
Unused module-local declaration 'calculateRequiredSamplesGGX' src/scene/graphics/reproject-texture.js:162— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'T1' · ×1
Unused module-local declaration 'T1' test/type-tests/element-input.test.ts:11— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'T2' · ×1
Unused module-local declaration 'T2' test/type-tests/element-input.test.ts:12— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'T3' · ×1
Unused module-local declaration 'T3' test/type-tests/element-input.test.ts:13— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'T4' · ×1
Unused module-local declaration 'T4' test/type-tests/element-input.test.ts:14— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'componentName' · ×1
Unused module-local declaration 'componentName' test/type-tests/entity.test.ts:109— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'notAComponentName' · ×1
Unused module-local declaration 'notAComponentName' test/type-tests/entity.test.ts:111— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 0/4 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types· Strict null checking is not enabled everywhere the repository type-checks · ×1
Strict null checking is not enabled everywhere the repository type-checks — 3/7 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
Silent fallback default in catch examples/src/app/download-project.mjs:119— `fontPages` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Skipped (documented): evaluates the transmission of area lights with the flipped normal test/scene/shader-lib/lit-diffuse-transmission.test.mjs:200— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): samples the standard textures through the uniform, declared once in the view block test/scene/shader-lib/standard-texture-bias.test.mjs:86— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): forces the top mip in the tiled nine-slice mode without redeclaring the uniform test/scene/shader-lib/standard-texture-bias.test.mjs:101— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): leaves a border wider than the blur of a VSM test/scene/renderer/directional-shadow-bounds.test.mjs:137— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): draws the forward and the shadow passes with the matrices in the storage and an empty mesh uniform buffer test/scene/renderer/mesh-instance-storage.test.mjs:128— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): grows the storage, and uploads the matrices of the nodes, and again when they move test/scene/renderer/mesh-instance-storage.test.mjs:146— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): keeps the slots across a device loss, and uploads them all to the recreated buffer test/scene/renderer/mesh-instance-storage.test.mjs:173— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): writes the matrices of a new node given to a mesh instance, at the same transform version test/scene/renderer/mesh-instance-storage.test.mjs:200— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): releases the slot of a mesh instance losing its mesh, and gives it a new one when drawn with a mesh test/scene/renderer/mesh-instance-storage.test.mjs:219— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): releases the slot of a removed sprite, for the next sprite to reuse test/scene/renderer/mesh-instance-storage.test.mjs:259— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): keeps a slot released during a frame for the draws recorded before, until the frame is submitted test/scene/renderer/mesh-instance-storage.test.mjs:288— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): reuses the slots of destroyed mesh instances test/scene/renderer/mesh-instance-storage.test.mjs:332— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): keeps the uniforms for instancing and draw commands, which use the instance index themselves test/scene/renderer/mesh-instance-storage.test.mjs:352— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): does not dirty the render pipeline per caster when the shadow map flips the front face test/scene/renderer/shadow-renderer-material-runs.test.mjs:202— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): skips non-clustered spot blur when execution is disabled for VSM type ${type} test/scene/renderer/shadow-renderer-vsm.test.mjs:40— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): keeps the full-map blur for non-clustered spot shadows test/scene/renderer/shadow-renderer-vsm.test.mjs:113— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): renders a pass mixing shaders with and without view textures test/scene/renderer/view-texture-bind-groups.test.mjs:256— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): draws fogged, normal mapped, dithered and shadow casting mesh instances with only their matrices per draw test/scene/renderer/view-uniform-pass-constants.test.mjs:153— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): leaves the textures on the scope when the device has no bind groups test/scene/materials/standard-material-uniform-buffer.test.mjs:941— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): runs the computes on the GPU test/platform/graphics/compute-pass.test.mjs:83— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): counts the dispatches of its computes, and its compute pass test/platform/graphics/compute-pass.test.mjs:121— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): asserts on a multisampled texture with an incapable format test/platform/graphics/texture.test.mjs:126— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): the wasm binary declares a 16MB initial heap that can grow test/framework/physics/ammo/ammo-builds.test.mjs:83— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): the wasm glue instantiates its binary and grows the heap on demand test/framework/physics/ammo/ammo-builds.test.mjs:94— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): the asm.js fallback starts at 16MB and grows the heap on demand test/framework/physics/ammo/ammo-builds.test.mjs:103— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
+ 2 more in this group — see findings.md.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a189ce-5daf-7dae-94d0-6e935edaf3ef · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 60 · Warnings: 1124 · Recommendations: 85 · Info: 27 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 29-10-2026 @ 22:36 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.