Public report of playcanvas/engine, published 15 November 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.11.4). 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, 15 November 2026, 04:56 UTC · Survey ID cd_bf88fc54451f4161b442b12e85a7e178
playcanvas/engine
Measured 15 November 2026, 04:52 UTC, at code version 9b21919
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 2 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: 400,485 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 3.2 person-years · Weakest lens: Security and Compliance, 44
Findings by how serious they are
52 critical1094 serious319 minor
11 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look 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
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 04:52 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 the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work 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 ▸
61of 61 dimensions measured by tools.
1451of 1465 findings point to an exact file and line, so you can open each one in the code. The other 14 concern the repository as a whole, such as missing documentation.
61dimensions across 6 lenses, read from 400,485 lines of product code in 1 project.
playcanvas/engine falls short of our standard for production, in part because 17 of the dependencies have a known vulnerability. It scores 53 out of 100 and is rated Adequate, and 44 of its 52 critical findings are security problems.
Security and Compliance, at 44, is the weakest lens and counts most in the score. The best first step is fixing the runtime or framework that no longer gets security updates, worth about 4 points. Updating the 17 dependencies with a known vulnerability would lift Security and Compliance itself, also worth about 4. Raising Security and Compliance to 70 would lift the score to about 60.
Twenty-four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Seventeen known security holes in the packages the code depends on can be used by attackers, and seven sets of files in separate parts keep changing together, which points to hidden dependencies. Pinning each tool to an exact version, updating the vulnerable packages and making the hidden dependencies explicit 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 use of a package that isn't listed needs adding to the project's list of dependencies.
The product code is 400,485 lines, about €470,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 44 to 70, the lowest score rated Strong, the score would rise from 53 to about 60.
Code composition: what the lines of code are
Product code 83%Tests 17%
New since the last survey: 155 findings
These 155 critical or serious findings weren't in the previous survey, on 29 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
We compare 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: 1013 findings
These 1013 critical or serious findings were in the previous survey, on 29 October 2026, and are gone from this one. The first 100 are listed here.
€160,000 to €790,000, for 2,613 to 8,291 hours of work, about 3.2 person-years for 1 to 7 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.7 at a score of 53. 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: 400,485 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: We price 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 1 End-of-life runtime finding(s) in Platform End-of-Life — start with .nvmrc.
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
14 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 (56 files) · Code Coverage (119 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 €470,000 to build again, about 3.2 person-years of work. Its weakest lens is Security and Compliance, at 44 (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 1 End-of-life runtime finding(s) in Platform End-of-Life. 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 1 Platform End-of-Life 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 we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 257,191 lines over the last 90 days, which is about 1,043,052 lines a year. At that pace, the extra work comes to an estimated 109.4 to 656.5 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 our 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.
781 modules, with 338 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; 741 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 · 56% · 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
31
High / Critical
A03:2025 — Software Supply Chain Failures
29
High / Critical
Roadmap
Top priorities: Resolve the 17 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (17); Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with .nvmrc; 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with .nvmrc.
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 — 52
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 — 1094
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 — 319
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 11
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
This survey 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. All 61 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two 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. 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.
What we checked — 61 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, 1451 of 1465 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 or a scanner, 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 — We 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 — We 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 — We 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.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We 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.
D26 Project Cohesion — not measured this run — We 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. `(repository root)` (281245 LoC, 967 module-visible types across 136 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D28 Secrets (history) — not measured this run — We 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. `gitleaks` TIMED OUT after 119.6s against a 119.6s budget, so we killed its process tree. The budget is ours; the work may simply be larger than it allows. Nothing about this repository is asserted by the absence of a result; the budget is ours to raise, and raising it is our backlog item, not an action for this repository's owner.
AX6 Interface segregation — not measured this run — We 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.
AXB2 Runtime readiness — not measured this run — We 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 dev server kept running but no port it opened served a page in the time allowed. (rule: no-answer). The renderer reported: the dev server (`npm run serve`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "HTTP 11/15/2026 4:55:15 AM 127.0.0.1 Returned 404 in 0 ms / HTTP 11/15/2026 4:55:18 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:18 AM 127.0.0.1 Returned 404 in 0 ms / HTTP 11/15/2026 4:55:21 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:21 AM 127.0.0.1 Returned 404 in 1 ms / HTTP 11/15/2026 4:55:24 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:24 AM 127.0.0.1 Returned 404 in 1 ms / HTTP 11/15/2026 4:55:27 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:27 AM 127.0.0.1 Returned 404 in 2 ms / HTTP 11/15/2026 4:55:30 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:30 AM 127.0.0.1 Returned 404 in 2 ms" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We 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 (`npm run serve`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "HTTP 11/15/2026 4:55:15 AM 127.0.0.1 Returned 404 in 0 ms / HTTP 11/15/2026 4:55:18 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:18 AM 127.0.0.1 Returned 404 in 0 ms / HTTP 11/15/2026 4:55:21 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:21 AM 127.0.0.1 Returned 404 in 1 ms / HTTP 11/15/2026 4:55:24 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:24 AM 127.0.0.1 Returned 404 in 1 ms / HTTP 11/15/2026 4:55:27 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:27 AM 127.0.0.1 Returned 404 in 2 ms / HTTP 11/15/2026 4:55:30 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:30 AM 127.0.0.1 Returned 404 in 2 ms" No runtime evidence was gathered.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we 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 — We measured this, but not all of it. What we 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. 644 further occurrence(s) are not listed individually; the score already reflects all 684.
R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 460 further occurrence(s) are not listed individually; the score already reflects all 500.
R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 107 further occurrence(s) are not listed individually; the score already reflects all 147.
R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 26 further occurrence(s) are not listed individually; the score already reflects all 66.
S1 Web-Security Posture — not measured this run — We 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. 1394 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled certificate validation, obsolete TLS versions, plaintext password storage and session cookies set without HttpOnly, Secure or SameSite, and none was found. The server controls this dimension also scores were not assessed, so no score is given.
X10 Duplicated predicate — not measured this run — We 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. 14 further occurrence(s) are not listed individually; the score already reflects all 54.
X4 Structured logging — not measured this run — We 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
We assess the repository exactly as committed, and only the repository. By design we do 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 our 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.
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 Secret Scanning: Secret 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.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
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.
305 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was constructor at 94. A further 11 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. 7 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/platform/graphics/uniform-buffer-format.js (UniformFormat.constructor at 23), utils/api-surface.mjs (api-surface.typeStr at 22), src/platform/graphics/webgl/webgl-shader-input.js (WebglShaderInput.constructor at 18), and 2 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.
+ 172 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 6 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with constructor (cyclomatic 94), TextElement._updateMeshes (cyclomatic 90), ElementComponentSystem.initializeComponentData (cyclomatic 85). — 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 6 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.
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.
+ 334 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 120 down to 120 or less in Cognitive Complexity — start with _updateMeshes (cognitive 232), upload (cognitive 212), draw (cognitive 160). — 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 5 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.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.1 / 10Stronggated by 124 serious findings✓ 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 32 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 (32 warning-level).
Resolve the 26 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 (26 warning-level).
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 16 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 (16 warning-level).
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 the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, 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 79.7% — 120 file(s) below 50%. Measured from the JavaScript/TypeScript suite (mocha + c8 via `npm ci --ignore-scripts` in the repository root).
Resolve the 120 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 (120 warning-level).
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality9.9 / 10Stronggated by 16 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.
31 skipped (29 with a documented reason), 14 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 4495 tests.
No assertions: releases a cubemap from each material referencing it · ×14test/framework/handlers/material-handler.test.mjs:791
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): uses the clear coat LTC matrix for area lights of every shape · ×29test/scene/shader-lib/lit-clearcoat-area-lights.test.mjs:128
What to do
Resolve the 14 No assertions finding(s) in Test Quality — start with element-drag-helper.test.mjs (10), material-handler.test.mjs, auto-exposure-effect.test.mjs. — One of this dimension's main actionable groups (14 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).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
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).
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.
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 package(s) this repository's committed lockfile installs for a consumer — its 2 production, optional and peer dependency(ies), across 1 product package.json manifest(s), and everything those install in turn. Its 57 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ 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 (26×58=1508); src/platform/graphics/webgl/webgl-graphics-device.js (29×47=1363); src/scene/renderer/forward-renderer.js (31×37=1147) Repeated repair below the complexity floor: scripts/esm/xr/xr-controllers.mjs (4 of 5 changes were fixes); src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js (3 of 5 changes were fixes); src/platform/graphics/graphics-device-create.js (3 of 4 changes were fixes)
Resolve the 53 Hotspot finding(s) in Churn × Complexity Hotspots — start with example.mjs (2), component.js (2), shadow-renderer.js. — One of this dimension's main actionable groups (53 warning-level).
Resolve the 5 Repeated repair finding(s) in Churn × Complexity Hotspots — start with xr-controllers.mjs, gsplat-work-buffer-render-pass.js, graphics-device-create.js. — One of this dimension's main actionable groups (5 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.7 / 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.
233 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 702 of the 1393 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.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
5 naming inconsistencies among 50 declarations measured against a convention their peers follow.
`getGlslShaderType` spells `Glsl` where 17 names in the project spell it `GLSL`src/platform/graphics/constants.js:1263
`getWgslShaderType` spells `Wgsl` where 20 names in the project spell it `WGSL`src/platform/graphics/constants.js:1277
`_userModifyWgsl` spells `Wgsl` where 20 names in the project spell it `WGSL`src/scene/gsplat-unified/gsplat-shadow-renderer.js:150
`FakeXRSession` spells `XR` where 24 names in the project spell it `Xr`test/framework/xr/fake-webxr.mjs:78
`FakeXRSystem` spells `XR` where 24 names in the project spell it `Xr`test/framework/xr/fake-webxr.mjs:177
What to do
Resolve the 1 `getGlslShaderType` spells `Glsl` where 17 names in the project spell it… finding(s) in Naming Consistency — start with constants.js. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `getWgslShaderType` spells `Wgsl` where 20 names in the project spell it… finding(s) in Naming Consistency — start with constants.js. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `_userModifyWgsl` spells `Wgsl` where 20 names in the project spell it… finding(s) in Naming Consistency — start with gsplat-shadow-renderer.js. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
doc comments repeat the namesscripts/esm/anim/anim-update-optimizer.mjs:232
What to do
Resolve the 182 redundant comment finding(s) in Comment Value — start with component.js (10), glb-parser.js (4), index.js (4). — One of this dimension's main actionable groups (182 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
36 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
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).
31 finding(s): 0 critical, 27 high, 4 medium, 0 low. 24 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 10 file(s) — `examples/assets/scripts/utils/area-light-lut-bin-gen.js`, `examples/assets/wasm/ammo/ammo.wasm.js`, `examples/assets/wasm/basis/basis.wasm.js`, `examples/assets/wasm/draco/draco.js`, `examples/assets/wasm/draco/draco.wasm.js`, … (+5 more) — 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
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 24 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 (24 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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 17 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (17). — One of this dimension's main actionable groups (17 issue-level).
Resolve the 5 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
Resolve the 2 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-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 702 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 702 of the 1393 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 7 Boundary-crossing change coupling finding(s) in Change Coupling — start with render-pass-compose.js (2), camera-frame.js (2), sog.js. — One of this dimension's main actionable groups (7 issue-level).
Resolve the 19 Change coupling finding(s) in Change Coupling — start with gsplat-work-buffer-render-pass.js (2), stdDeclaration.js, constants.js. — One of this dimension's main actionable groups (19 warning-level).
Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with gsplat-manager.js, standard-material-options-builder.js, forward-renderer.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. Reported 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. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
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.
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
`_onColorMapAssetChange` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/framework/components/particle-system/component.js:1977
`_onNormalMapAssetChange` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/framework/components/particle-system/component.js:2013
`_onMeshAssetChange` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/framework/components/particle-system/component.js:2049
`readPixels` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/platform/graphics/null/null-graphics-device.js:91
`setBindGroup` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/platform/graphics/null/null-graphics-device.js:118
`createUploadStreamImpl` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — src/platform/graphics/null/null-graphics-device.js:133
`setShader` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/platform/graphics/null/null-graphics-device.js:140
`setAlphaToCoverage` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/platform/graphics/null/null-graphics-device.js:161
`clear` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/platform/graphics/null/null-graphics-device.js:168
`setViewport` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/platform/graphics/null/null-graphics-device.js:171
`setScissor` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/platform/graphics/null/null-graphics-device.js:174
`copyRenderTarget` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — src/platform/graphics/null/null-graphics-device.js:177
`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:992
`_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
`updateBegin` has an empty body — confirm it's an intentional no-op and not an unfinished method. — src/platform/graphics/null/null-graphics-device.js:85
`updateEnd` has an empty body — confirm it's an intentional no-op and not an unfinished method. — src/platform/graphics/null/null-graphics-device.js:88
`popMarker` has an empty body — confirm it's an intentional no-op and not an unfinished method. — src/platform/graphics/null/null-graphics-device.js:188
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 repository and its projects have a README, and whether it is substantive.
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.
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 repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
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's code 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 6 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:7
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 each language's code 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.rmSync` in `callback to THUMBNAIL_SIZES.forEach` 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:203
`fs.existsSync` in `callback to THUMBNAIL_SIZES.every` 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:216
`fs.existsSync` in `checkThumbnails` 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:298
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 — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): 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. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
75 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 53 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 75 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 75 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 75 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:424
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
42 duplicated blocks under the repository root have copies in at least two of the sibling directories scripts, src — 18 of them are reported below, and 24 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 42 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 42 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 42 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
21 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 10 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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) — 10 of them are reported below, and 7 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:960
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:281
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 — 171 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:110 — 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/framework/parsers/sog-bundle.js:141 · src/framework/parsers/sog.js:81 — the two spans are one implementation copied and then locally edited — 723 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
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/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
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/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/scene/light.js:627 · src/scene/lighting/lighting-params.js:169 — the two spans are one implementation copied and then locally edited — 273 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/light.js:627
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:171 · src/extras/input/sources/single-gesture-source.js:132 — 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:171
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/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:143 · src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog.js:83 — the two spans are one implementation copied and then locally edited — 442 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:143
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/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/core/math/quat.js:36 · src/core/math/vec4.js:25 — the two spans are one implementation copied and then locally edited — 328 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/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/gsplat-unified/gsplat-interval-compaction.js:164 · src/scene/gsplat-unified/gsplat-projector.js:240 — the two spans are one implementation copied and then locally edited — 255 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/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:94 · src/extras/input/sources/single-gesture-source.js:60 — 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:94
scripts/esm/gsplat/reveal-grid-eruption.mjs:339 · scripts/esm/gsplat/reveal-rain.mjs:385 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/esm/gsplat/reveal-grid-eruption.mjs:339
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:1559
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:310
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
constructor has cyclomatic complexity 44 and cognitive complexity 45; 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:320
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
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
readAttachment has cyclomatic complexity 42 and cognitive complexity 68; 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:9966
parseSpriteSheet has cyclomatic complexity 42 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 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/parsers/sprite-sheet.js:40
computeWorldPositions has cyclomatic complexity 41 and cognitive complexity 87; 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:7450
_setupLightingDefines has cyclomatic complexity 41 and cognitive complexity 87; 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/lit-shader.js:428
draw has cyclomatic complexity 40 and cognitive complexity 149; 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-graphics-device.js:2288
onContactPair has cyclomatic complexity 40 and cognitive complexity 96; 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/rigid-body/system.js:882
rebuildGeometry has cyclomatic complexity 40 and cognitive complexity 66; 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/mini-stats/mini-stats.js:792
applyToSlot has cyclomatic complexity 39 and cognitive complexity 116; 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:3215
_applyTreeCut has cyclomatic complexity 39 and cognitive complexity 85; 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/gsplat-unified/gsplat-octree-instance.js:753
drain has cyclomatic complexity 39 and cognitive complexity 76; 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:5129
inc has cyclomatic complexity 37 and cognitive complexity 61; 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:14642
raycast has cyclomatic complexity 37 and cognitive complexity 51; 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/voxel/voxel-occupancy.js:360
(anonymous) has cyclomatic complexity 36 and cognitive complexity 102; 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/gsplat/gsplat-sort-worker.js:211
log has cyclomatic complexity 36 and cognitive complexity 88; 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-pass.js:794
buildFrameGraph has cyclomatic complexity 36 and cognitive complexity 74; 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/renderer/forward-renderer.js:644
start has cyclomatic complexity 35 and cognitive complexity 56; 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/xr/xr-manager.js:537
create has cyclomatic complexity 34 and cognitive complexity 97; 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/batching/batch-manager.js:687
render has cyclomatic complexity 34 and cognitive complexity 68; 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:13744
update has cyclomatic complexity 34 and cognitive complexity 42; 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/gsplat/gsplat-sort-worker.js:46
draw has cyclomatic complexity 34 and cognitive complexity 24; 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/extras/renderers/texture-renderer.js:228
bakeInternal has cyclomatic complexity 33 and cognitive complexity 97; 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/lightmapper/lightmapper.js:935
Do you agree with this assessment?
R3 · Large Files6.0 / 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 2958 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 2364 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 2180 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 2104 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/app-base.js has 2055 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/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 1992 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/platform/graphics/graphics-device.js has 1893 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/extras/effects/dynamic-sky/dynamic-sky-effect.js has 1887 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/scene/mesh-instance.js has 1885 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/scene/graph-node.js has 1748 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/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 1556 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/framework/components/camera/component.js has 1525 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/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/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 1289 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 1273 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
src/scene/gsplat-unified/gsplat-octree-instance.js has 1189 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-octree-instance.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/scene/camera.js has 1156 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/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/gsplat-unified/gsplat-world.js has 1135 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 1121 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 1109 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 1055 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/framework/input/element-input.js has 1041 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/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
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.5 / 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) — examples/src/app/components/Example.mjs:1, examples/src/app/components/code-editor/CodeEditorDesktop.mjs:1, utils/esbuild-build-target.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.
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.6 / 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 355 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, 355 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 (×5) — examples/utils/generate-vfx-textures.mjs, examples/utils/generate-ui-atlas.mjs, examples/src/app/events.js, …
Nothing imports this binding — it is safe to review for removal. (×16) — examples/utils/build-examples.mjs:68, src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-interval-cull.js:111, src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-interval-scatter.js:61, …
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. (×10) — scripts/esm/camera-controls.mjs:182, src/scene/graphics/reproject-texture.js:162, test/type-tests/anim-component.test.ts:13, …
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 · 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 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/2 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) 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 })`. — src/framework/parsers/ply.js:620
`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
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.
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.
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.
`.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. — src/platform/graphics/webgpu/webgpu-render-pipeline.js:632
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. (×4) — src/platform/graphics/webgpu/webgpu-xr-bridge.js:127, src/platform/graphics/webgpu/webgpu-xr-bridge.js:307, 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — src/framework/xr/xr-anchors.js:457
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 — 40 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 — 65 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.
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 (`npm run serve`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "HTTP 11/15/2026 4:55:15 AM 127.0.0.1 Returned 404 in 0 ms / HTTP 11/15/2026 4:55:18 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:18 AM 127.0.0.1 Returned 404 in 0 ms / HTTP 11/15/2026 4:55:21 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:21 AM 127.0.0.1 Returned 404 in 1 ms / HTTP 11/15/2026 4:55:24 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:24 AM 127.0.0.1 Returned 404 in 1 ms / HTTP 11/15/2026 4:55:27 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:27 AM 127.0.0.1 Returned 404 in 2 ms / HTTP 11/15/2026 4:55:30 AM 127.0.0.1 GET / / HTTP 11/15/2026 4:55:30 AM 127.0.0.1 Returned 404 in 2 ms" No runtime evidence was gathered. 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.
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"]`.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D28 Secrets (history) — gitleaks killed before it finished — this repository's working tree not scanned
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.
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), 1399 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 1392 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 scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
S1 Web-Security Posture — Not assessed: 1394 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation, obsolete TLS versions, passwords stored or checked as plaintext and session cookies set without HttpOnly, Secure or SameSite, 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. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and 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.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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: sog.js ↔ sog.js src/framework/parsers/sog.js:1— `src/framework/parsers/sog.js` (context framework) and `src/scene/shader-lib/glsl/chunks/gsplat/vert/formats/sog.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 `7c1b28f0` fix: Read SOG v3 rotations from quats.webp (#10007); `f1c076c1` Support any number of typed blind fields in SOG v3 (#9960); `1f958e21` refactor: read SOG gsplat data directly from source textures (#8628) — run `git show` on any of them.
Boundary-crossing change coupling: webgpu-graphics-device.js ↔ quad-render-utils.js src/platform/graphics/webgpu/webgpu-graphics-device.js:1— `src/platform/graphics/webgpu/webgpu-graphics-device.js` (context platform) and `src/scene/graphics/quad-render-utils.js` (context scene) sit in DIFFERENT parts of the tree yet 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) — 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 10 shared commits counted here, the most recent 3 are `bb327c9b` feat: Warn when a WebGPU render pass targets the backbuffer outside o…; `c30f8d8b` Bump allocation for Uniform Buffers on WebGPU (#5438); `325ece1a` Updated the way WebGPU submits command buffers for rendering (#5423) — 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:310— src/scene/renderer/shadow-renderer.js changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in ShadowRenderer.cullShadowCastersOmni at line 310. 4 of those changes were fix/bug commits, and the other 22 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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:254— src/platform/graphics/webgl/webgl-graphics-device.js changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in WebglGraphicsDevice.constructor at line 254. 5 of those changes were fix/bug commits, and the other 24 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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:644— src/scene/renderer/forward-renderer.js changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in ForwardRenderer.buildFrameGraph at line 644. 3 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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:1469— src/platform/graphics/webgpu/webgpu-graphics-device.js changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in WebgpuGraphicsDevice.draw at line 1469. 12 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/framework/components/element/text-element.js src/framework/components/element/text-element.js:864— src/framework/components/element/text-element.js changed 9 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 5 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/platform/graphics/texture.js src/platform/graphics/texture.js:1559— src/platform/graphics/texture.js changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in Texture._validateCopy at line 1559. 6 of those changes were fix/bug commits, and the other 11 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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:598— src/framework/app-base.js changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AppBase.init at line 598. 5 of those changes were fix/bug commits, and the other 34 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/platform/graphics/render-target.js src/platform/graphics/render-target.js:388— src/platform/graphics/render-target.js changed 10 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 9 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/scene/materials/standard-material-options-builder.js src/scene/materials/standard-material-options-builder.js:290— src/scene/materials/standard-material-options-builder.js changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in StandardMaterialOptionsBuilder._updateEnvOptions at line 290. 3 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/renderer/renderer.js src/scene/renderer/renderer.js:499— src/scene/renderer/renderer.js changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Renderer.setCameraUniforms at line 499. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/platform/graphics/webgl/webgl-texture.js src/platform/graphics/webgl/webgl-texture.js:481— src/platform/graphics/webgl/webgl-texture.js changed 6 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/mesh-instance.js src/scene/mesh-instance.js:1965— 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 1965. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/platform/graphics/webgpu/webgpu-texture.js src/platform/graphics/webgpu/webgpu-texture.js:386— src/platform/graphics/webgpu/webgpu-texture.js changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in WebgpuTexture.uploadData at line 386. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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.
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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/scene/gsplat-unified/gsplat-projector.js src/scene/gsplat-unified/gsplat-projector.js:665— src/scene/gsplat-unified/gsplat-projector.js changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in GSplatProjector.dispatch at line 665. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +00:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-projector.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 11 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/framework/lightmapper/lightmapper.js src/framework/lightmapper/lightmapper.js:935— src/framework/lightmapper/lightmapper.js changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Lightmapper.bakeInternal at line 935. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/renderer/render-pass-forward.js src/scene/renderer/render-pass-forward.js:549— 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 17 in RenderPassForward.renderLayerRenderStep at line 549. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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 12 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/scene/batching/batch-manager.js src/scene/batching/batch-manager.js:687— src/scene/batching/batch-manager.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in BatchManager.create at line 687. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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/scene/gsplat-unified/gsplat-manager.js src/scene/gsplat-unified/gsplat-manager.js:740— src/scene/gsplat-unified/gsplat-manager.js changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in GSplatManager.update at line 740. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +00:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-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/gsplat-unified/gsplat-shadow-renderer.js src/scene/gsplat-unified/gsplat-shadow-renderer.js:557— src/scene/gsplat-unified/gsplat-shadow-renderer.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in GSplatShadowRenderer._cullEntry at line 557. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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.
+ 28 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
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 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 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 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/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 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.
No test reaches this file examples/utils/generate-vfx-textures.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/utils/build-examples.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/utils/generate-ui-atlas.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 build.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/download-project.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/MainLayout.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/assets/scripts/misc/hatch-material.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/plugins/rollup-types-fixup.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/iframe/loader.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/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 examples/utils/thumbnails.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/url-state.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/glsl.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/assets/scripts/misc/gooch-material.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/utils/build-prod.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/CodeEditorBase.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/ShareDialog.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/DeviceSelector.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/types-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.
ClassTooLong: WebglGraphicsDevice src/platform/graphics/webgl/webgl-graphics-device.js:153— ClassTooLong — 1662 significant lines (blank, comment-only and punctuation-only lines excluded), 90 methods. The bar is 400 significant lines; this is 1262 over it, 4.16× 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:74— ClassTooLong — 1009 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 400 significant lines; this is 609 over it, 2.52× 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 — 748 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 348 over it, 1.87× 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:241— ClassTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 339 over it, 1.85× 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:142— ClassTooLong — 738 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 400 significant lines; this is 338 over it, 1.85× 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: 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: 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:52— ClassTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 182 over it, 1.46× 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 — 581 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 181 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: Renderer src/scene/renderer/renderer.js:159— ClassTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 175 over it, 1.44× 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 — 573 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 173 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: 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: GraphicsDevice src/platform/graphics/graphics-device.js:58— ClassTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 153 over it, 1.38× 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:85— ClassTooLong — 548 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 148 over it, 1.37× 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: GSplatOctreeInstance src/scene/gsplat-unified/gsplat-octree-instance.js:86— ClassTooLong — 506 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 106 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.
ClassTooLong: GraphNode src/scene/graph-node.js:122— ClassTooLong — 498 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 98 over it, 1.25× 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:357— ClassTooLong — 483 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 83 over it, 1.21× 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.
FileTooLong: webgl/webgl-graphics-device.js src/platform/graphics/webgl/webgl-graphics-device.js— FileTooLong — 1760 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 (153-3439). The bar is 1500 significant lines; this is 260 over it, 1.17× 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 — 1060 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: WebgpuGraphicsDevice (74-2388). The bar is 500 significant lines; this is 560 over it, 2.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: materials/standard-material.js src/scene/materials/standard-material.js— FileTooLong — 827 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 327 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: dynamic-sky/dynamic-sky-effect.js src/extras/effects/dynamic-sky/dynamic-sky-effect.js— FileTooLong — 827 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: DynamicSkyEffect (241-2127). The bar is 500 significant lines; this is 327 over it, 1.65× 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/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: framework/app-base.js src/framework/app-base.js— FileTooLong — 791 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: AppBase (142-2366). The bar is 500 significant lines; this is 291 over it, 1.58× 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/component.js src/framework/components/particle-system/component.js— FileTooLong — 760 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ParticleSystemComponent (137-2410). The bar is 500 significant lines; this is 260 over it, 1.52× 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: 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-1346). 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 — 678 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 178 over it, 1.36× 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 — 668 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: MeshInstance (326-2152). The bar is 500 significant lines; this is 168 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: renderer/renderer.js src/scene/renderer/renderer.js— FileTooLong — 656 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: Renderer (159-1499). 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: 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 — 622 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: Lightmapper (66-1167). The bar is 500 significant lines; this is 122 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 — 613 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: Camera (52-1339). The bar is 500 significant lines; this is 113 over it, 1.23× 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 — 607 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: ElementInput (357-1243). The bar is 500 significant lines; this is 107 over it, 1.21× 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: graphics/graphics-device.js src/platform/graphics/graphics-device.js— FileTooLong — 589 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: GraphicsDevice (58-2126). The bar is 500 significant lines; this is 89 over it, 1.18× 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: 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:153— TooManyMethods — 90 methods. The bar is 30 methods; this is 60 over it, 3.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: WebgpuGraphicsDevice src/platform/graphics/webgpu/webgpu-graphics-device.js:74— TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.77× 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: GraphicsDevice src/platform/graphics/graphics-device.js:58— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.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: GraphNode src/scene/graph-node.js:122— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.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: AppBase src/framework/app-base.js:142— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× 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 — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: 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: NullGraphicsDevice src/platform/graphics/null/null-graphics-device.js:18— 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: 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: DynamicSkyEffect src/extras/effects/dynamic-sky/dynamic-sky-effect.js:241— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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:64— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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:357— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: 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:254— MethodTooLong — constructor runs 350 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 250 over it, 3.50× 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: 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:687— 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: SogBundleParser.load src/framework/parsers/sog-bundle.js:188— MethodTooLong — load runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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:2288— 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: GSplatProjector.dispatch src/scene/gsplat-unified/gsplat-projector.js:665— MethodTooLong — dispatch runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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:935— 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: 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: GSplatOctreeInstance._applyTreeCut src/scene/gsplat-unified/gsplat-octree-instance.js:753— MethodTooLong — _applyTreeCut 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.
MethodTooLong: ShadowRenderer.cullShadowCastersOmni src/scene/renderer/shadow-renderer.js:310— 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: 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: 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: gsplat-sog-data.js ↔ sog.js src/scene/gsplat/gsplat-sog-data.js:1— `src/scene/gsplat/gsplat-sog-data.js` and `src/scene/shader-lib/glsl/chunks/gsplat/vert/formats/sog.js` change together 64% of the time (7 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 7 shared commits counted here, the most recent 3 are `7c1b28f0` fix: Read SOG v3 rotations from quats.webp (#10007); `f1c076c1` Support any number of typed blind fields in SOG v3 (#9960); `1f958e21` refactor: read SOG gsplat data directly from source textures (#8628) — 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: 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 58% of the time (11 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 11 shared commits counted here, the most recent 3 are `7c1b28f0` fix: Read SOG v3 rotations from quats.webp (#10007); `f1c076c1` Support any number of typed blind fields in SOG v3 (#9960); `2ffa84bf` Recover SOG streaming across WebGL context loss (#9350) — 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-evaluator.js ↔ component-layer.js src/framework/anim/evaluator/anim-evaluator.js:1— `src/framework/anim/evaluator/anim-evaluator.js` and `src/framework/components/anim/component-layer.js` change together 55% of the time (12 of the 22 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 `7489767e` Add AnimComponent#evaluationInterval and the AnimUpdateOptimizer scri…; `b92c588e` Add AnimComponent#offscreenUpdate to skip animating characters which …; `a82e7f1f` [Anim Component] Support empty AnimTracks (#5112) — 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: 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 52% of the time (11 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 11 shared commits counted here, the most recent 3 are `ce589764` perf: Compile clustered area light code once per shader, and only for…; `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`) — 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 50% of the time (7 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 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: 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: 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: 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: 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: ForwardRenderer (LCOM4 4) src/scene/renderer/forward-renderer.js:71— ForwardRenderer'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.
IC1 · Incompleteness & stubs· Empty method body · ×15
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/framework/components/particle-system/component.js:1977— `_onColorMapAssetChange` 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/particle-system/component.js:2013— `_onNormalMapAssetChange` 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/particle-system/component.js:2049— `_onMeshAssetChange` 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-graphics-device.js:91— `readPixels` 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-graphics-device.js:118— `setBindGroup` 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-graphics-device.js:140— `setShader` 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-graphics-device.js:161— `setAlphaToCoverage` 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-graphics-device.js:168— `clear` 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-graphics-device.js:171— `setViewport` 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-graphics-device.js:174— `setScissor` 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.
No assertions: releases a cubemap from each material referencing it test/framework/handlers/material-handler.test.mjs:791— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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.
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-unified-sort-worker.UnifiedSortWorker src/scene/gsplat-unified/gsplat-unified-sort-worker.js:4— FunctionTooLong — UnifiedSortWorker runs 253 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 153 over it, 2.53× 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: standard-material._defineMaterialProps src/scene/materials/standard-material.js:2366— FunctionTooLong — _defineMaterialProps runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.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.
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.
Swallowed exception (empty catch) src/platform/graphics/webgpu/webgpu-render-pipeline.js:632— `.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.
Swallowed exception (empty catch) src/platform/graphics/webgpu/webgpu-xr-bridge.js:127— 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:307— 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.
Repeated repair: scripts/esm/xr/xr-controllers.mjs scripts/esm/xr/xr-controllers.mjs:387— scripts/esm/xr/xr-controllers.mjs changed 5 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 13 (its worst body is XrControllers.update at line 387), AT OR 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: Skip a screen's touch in XrControllers, which has no model to draw (#9881)”; “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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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: 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 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 14 (its worst body is GSplatWorkBufferRenderPass.update at line 116), AT OR 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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), AT OR 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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: src/scene/gsplat-unified/gsplat-unified-sorter.js src/scene/gsplat-unified/gsplat-unified-sorter.js:79— src/scene/gsplat-unified/gsplat-unified-sorter.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 6 (its worst body is GSplatUnifiedSorter.onSorted at line 79), AT OR 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: Restore gsplat shadows after graphics context loss (#10021)”; “fix: Space gsplat sort keys by log distance so stray far splats keep near precision (#9899)”; “fix: Keep the Node worker_threads require out of bundled worker code (#9656)”. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +00:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-unified-sorter.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/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), AT OR 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 02:14:38 +00:00' --until='2026-11-14 02:14:38 +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.
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.
Change-coupling hub: gsplat-params.js → gsplat-octree.js, gsplat-placement.js, gsplat-quad-renderer.js src/scene/gsplat-unified/gsplat-params.js— `src/scene/gsplat-unified/gsplat-params.js` changes together with 3 other files — `src/scene/gsplat-unified/gsplat-octree.js`, `src/scene/gsplat-unified/gsplat-placement.js`, `src/scene/gsplat-unified/gsplat-quad-renderer.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.
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.
Sync-over-async blocking examples/utils/thumbnails.mjs:203— `fs.rmSync` in `callback to THUMBNAIL_SIZES.forEach` 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:216— `fs.existsSync` in `callback to THUMBNAIL_SIZES.every` 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:298— `fs.existsSync` in `checkThumbnails` 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.
R10 · Code Duplication· Duplicated block with local edits (53 matched lines × 2 locations) · ×3
Duplicated block with local edits (53 matched lines × 2 locations) src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:143— src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:143 · src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog.js:83 — the two spans are one implementation copied and then locally edited — 442 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 (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.
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.
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:272— 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:314— 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×2
REDACTED
REDACTED
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:992— 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.
Hollow method — returns a constant without doing the work src/platform/graphics/null/null-graphics-device.js:133— `createUploadStreamImpl` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work src/platform/graphics/null/null-graphics-device.js:177— `copyRenderTarget` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
R10 · Code Duplication· Duplicated block with local edits (44 matched lines × 2 locations) · ×2
Duplicated block with local edits (44 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 — 328 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 (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.
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, 355 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, 355 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
X2 · Cancellation propagation· Async function without AbortSignal · ×2
Async function without AbortSignal: load src/framework/parsers/ply.js:620— `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 })`.
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.
UnifiedSortWorker (cyclomatic 61) src/scene/gsplat-unified/gsplat-unified-sort-worker.js:4— UnifiedSortWorker has cyclomatic complexity 61 (threshold 15). Most of this is not in the body itself: 1 of the 61 points is its own statement and the rest belongs to 16 function items inside it that branch (computeEffectiveDistanceRangeLinear, sort, computeEffectiveDistanceRangeRadial, …). 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:310— 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:1559— _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:254— 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.
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:2288— 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.
constructor (cyclomatic 44) src/platform/graphics/texture.js:320— constructor has cyclomatic complexity 44 (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.
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.
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.
GSplatOctreeInstance._applyTreeCut (cyclomatic 39) src/scene/gsplat-unified/gsplat-octree-instance.js:753— GSplatOctreeInstance._applyTreeCut has cyclomatic complexity 39 (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.
sprite-sheet.parseSpriteSheet (cyclomatic 39) src/framework/parsers/sprite-sheet.js:40— sprite-sheet.parseSpriteSheet has cyclomatic complexity 39 (threshold 15). Of this number, 38 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.
ForwardRenderer.buildFrameGraph (cyclomatic 37) src/scene/renderer/forward-renderer.js:644— 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.
VoxelOccupancy.raycast (cyclomatic 37) src/extras/voxel/voxel-occupancy.js:360— VoxelOccupancy.raycast has cyclomatic complexity 37 (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.
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:794— 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.
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:687— 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:1314— 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:935— 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.
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.
CubemapHandler.update (cyclomatic 31) src/framework/handlers/cubemap.js:104— CubemapHandler.update 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.
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:275— 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.
GSplatSogIterator.constructor (cyclomatic 30) src/scene/gsplat/gsplat-sog-data.js:62— GSplatSogIterator.constructor has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 10 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 86). 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.
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.
GSplatWorld._updateWorldState (cyclomatic 29) src/scene/gsplat-unified/gsplat-world.js:599— GSplatWorld._updateWorldState has cyclomatic complexity 29 (threshold 15). Of this number, 24 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.
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.
draw (cyclomatic 29) src/platform/graphics/webgpu/webgpu-graphics-device.js:1469— draw 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:2250— 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.
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.
GSplatProjector.dispatch (cyclomatic 28) src/scene/gsplat-unified/gsplat-projector.js:665— GSplatProjector.dispatch has cyclomatic complexity 28 (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.
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.
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.
renderForwardLayer (cyclomatic 26) src/scene/renderer/forward-renderer.js:479— renderForwardLayer has cyclomatic complexity 26 (threshold 15). Of this number, 19 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.
_setupLight (cyclomatic 26) src/extras/effects/volumetric-fog/passes/render-pass-volumetric-fog-local.js:270— _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.
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.
initFromGpuDevice (cyclomatic 25) src/platform/graphics/webgpu/webgpu-graphics-device.js:793— 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.
load (cyclomatic 25) src/framework/parsers/sog-bundle.js:188— load has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 16 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.
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.
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:1374— 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.
StandardMaterialOptionsBuilder._updateEnvOptions (cyclomatic 24) src/scene/materials/standard-material-options-builder.js:290— StandardMaterialOptionsBuilder._updateEnvOptions has cyclomatic complexity 24 (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.
copyTextureToTexture (cyclomatic 24) src/platform/graphics/webgl/webgl-graphics-device.js:1456— 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.
_createProjectorCompute (cyclomatic 24) src/scene/gsplat-unified/gsplat-projector.js:413— _createProjectorCompute has cyclomatic complexity 24 (threshold 15). Of this number, 22 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.
WebglGraphicsDevice.endRenderPass (cyclomatic 23) src/platform/graphics/webgl/webgl-graphics-device.js:1768— 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.
AnimEvaluator.update (cyclomatic 23) src/framework/anim/evaluator/anim-evaluator.js:228— AnimEvaluator.update 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.
StandardMaterialOptionsBuilder._updateMaterialOptions (cyclomatic 23) src/scene/materials/standard-material-options-builder.js:202— StandardMaterialOptionsBuilder._updateMaterialOptions has cyclomatic complexity 23 (threshold 15). Of this number, 21 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.
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.
D1 · Cyclomatic Complexity· get (cyclomatic 23) · ×1
get (cyclomatic 23) src/platform/graphics/webgpu/webgpu-render-pipeline.js:281— get has cyclomatic complexity 23 (threshold 15). Of this number, 22 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.
_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.
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.
SpriteComponentSystem.initializeComponentData (cyclomatic 22) src/framework/components/sprite/system.js:152— SpriteComponentSystem.initializeComponentData has cyclomatic complexity 22 (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.
TextureAtlasHandler.patch (cyclomatic 22) src/framework/handlers/texture-atlas.js:232— TextureAtlasHandler.patch has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 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.
AnimController.updateStateFromTransition (cyclomatic 22) src/framework/anim/controller/anim-controller.js:481— 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 76, a function literal at line 116, …). 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:499— 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.
constructor::read (cyclomatic 22) src/scene/gsplat/gsplat-sog-data.js:86— constructor::read 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.
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:861— 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.
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:673— 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:2763— 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:1121— 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.
beginFrame (cyclomatic 21) src/platform/graphics/webgpu/webgpu-xr-bridge.js:73— beginFrame 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.
GraphicsDevice.initCapsDefines (cyclomatic 20) src/platform/graphics/graphics-device.js:919— 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:557— 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:276— 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:899— 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:598— 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.
gsplat-lod-tree.readEntries (cyclomatic 19) src/scene/gsplat-unified/gsplat-lod-tree.js:35— gsplat-lod-tree.readEntries 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:312— 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.
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:1655— 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:1927— 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 1949, a function literal at line 1973, a function literal at line 1931, …). 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.
renderLayerRenderStep (cyclomatic 19) src/scene/renderer/render-pass-forward.js:549— renderLayerRenderStep has cyclomatic complexity 19 (threshold 15). Of this number, 17 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.
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.
GraphicsDevice.getRenderableHdrFormat (cyclomatic 18) src/platform/graphics/graphics-device.js:2052— 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.
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.
MeshInstance.getMaterialBindGroup (cyclomatic 18) src/scene/mesh-instance.js:1965— 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.
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.
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:2048— 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.
WebgpuMipmapRenderer.generate (cyclomatic 18) src/platform/graphics/webgpu/webgpu-mipmap-renderer.js:193— WebgpuMipmapRenderer.generate 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.
destroy (cyclomatic 18) src/framework/app-base.js:2044— destroy 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.
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.
LightsBuffer.addLightData (cyclomatic 17) src/scene/lighting/lights-buffer.js:200— 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.
GSplatManager.update (cyclomatic 17) src/scene/gsplat-unified/gsplat-manager.js:740— GSplatManager.update has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
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:743— 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:261— 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:562— 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.
_updateTexOptions (cyclomatic 17) src/scene/materials/standard-material-options-builder.js:128— _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.
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.
MeshInstance.aabb (cyclomatic 16) src/scene/mesh-instance.js:875— 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.
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:948— 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 961). 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.
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:2529— 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.
frameUpdate (cyclomatic 16) src/extras/effects/dynamic-sky/dynamic-sky-effect.js:1790— 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:620— 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.
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.
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:2288— 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:935— 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:687— 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:794— 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.
GSplatOctreeInstance._applyTreeCut (cognitive 85) src/scene/gsplat-unified/gsplat-octree-instance.js:753— GSplatOctreeInstance._applyTreeCut has cognitive complexity 85 (threshold 15). Drivers by points: if/else 20 (48 pts), loops 12 (27 pts), boolean chains 6, ternaries 1 (4 pts) (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.
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:644— 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.
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.
draw (cognitive 65) src/platform/graphics/webgpu/webgpu-graphics-device.js:1469— draw has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (47 pts), boolean chains 6, ternaries 2 (6 pts), loops 1 (3 pts), other 3 (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.
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.
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:1314— 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.
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:310— 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.
copyRenderTarget (cognitive 55) src/platform/graphics/webgpu/webgpu-graphics-device.js:2250— 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.
CubemapHandler.update (cognitive 54) src/framework/handlers/cubemap.js:104— CubemapHandler.update has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 14, ternaries 4 (12 pts), loops 4 (10 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.
AnimController.update (cognitive 54) src/framework/anim/controller/anim-controller.js:673— 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.
VoxelOccupancy.raycast (cognitive 54) src/extras/voxel/voxel-occupancy.js:360— VoxelOccupancy.raycast has cognitive complexity 54 (threshold 15). Drivers by points: if/else 24 (39 pts), ternaries 6 (9 pts), boolean chains 5, 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.
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:275— 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:276— 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.
_updateWorldState (cognitive 47) src/scene/gsplat-unified/gsplat-world.js:599— _updateWorldState has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 9 (17 pts), boolean chains 7, ternaries 2 (6 pts) (nesting depth added 20). Of this number, 35 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.
_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.
constructor (cognitive 45) src/platform/graphics/texture.js:320— constructor has cognitive complexity 45 (threshold 15). Drivers by points: other 24, 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.
updateStateFromTransition (cognitive 45) src/framework/anim/controller/anim-controller.js:481— 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:1768— 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.
_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:1559— _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:254— 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.
AnimEvaluator.update (cognitive 41) src/framework/anim/evaluator/anim-evaluator.js:228— AnimEvaluator.update has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 6 (11 pts), boolean chains 3 (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.
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.
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.
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.
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.
constructor::read (cognitive 39) src/scene/gsplat/gsplat-sog-data.js:86— constructor::read has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 4 (14 pts), ternaries 3 (7 pts), match/switch 1 (2 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.
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.
Lightmapper.collectModels (cognitive 38) src/framework/lightmapper/lightmapper.js:312— 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.
TextureAtlasHandler.patch (cognitive 38) src/framework/handlers/texture-atlas.js:232— TextureAtlasHandler.patch has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (33 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 17). Of this number, 35 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.
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.
renderForwardLayer (cognitive 38) src/scene/renderer/forward-renderer.js:479— renderForwardLayer has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 3 (10 pts), other 8, boolean chains 3 (nesting depth added 14). Of this number, 20 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.
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:875— 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.
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:1374— 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.
dispatch (cognitive 35) src/scene/gsplat-unified/gsplat-projector.js:665— dispatch has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 8 (12 pts), boolean chains 8, loops 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.
GraphNode._sync (cognitive 34) src/scene/graph-node.js:1630— 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.
gsplat-lod-tree.readEntries (cognitive 34) src/scene/gsplat-unified/gsplat-lod-tree.js:35— gsplat-lod-tree.readEntries has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 7 (12 pts), boolean chains 4 (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.
GSplatWorld.cleanupOldWorldStates (cognitive 34) src/scene/gsplat-unified/gsplat-world.js:890— 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:1655— 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.
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.
GSplatComponent.castShadows (cognitive 33) src/framework/components/gsplat/component.js:332— 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.
sprite-sheet.parseSpriteSheet (cognitive 33) src/framework/parsers/sprite-sheet.js:40— sprite-sheet.parseSpriteSheet has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 6 (10 pts), boolean chains 7, 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.
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:62— 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:499— 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:661— 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:562— 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.
D2 · Cognitive Complexity· get (cognitive 31) · ×1
get (cognitive 31) src/platform/graphics/webgpu/webgpu-render-pipeline.js:281— get has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (14 pts), other 7, ternaries 6, loops 2 (3 pts), boolean chains 1 (nesting depth added 7). Of this number, 30 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.
beginFrame (cognitive 31) src/platform/graphics/webgpu/webgpu-xr-bridge.js:73— beginFrame has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, error handling 2 (5 pts), loops 2 (3 pts), other 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.
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:861— 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.
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:899— 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:1803— 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:270— _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.
load (cognitive 29) src/framework/parsers/sog-bundle.js:188— load has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (20 pts), other 3, error handling 2, loops 2, boolean chains 1, ternaries 1 (nesting depth added 4). Of this number, 25 points are the body's own statements and 4 belong to 16 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.
GSplatWorld.applyWorkBufferUpdates (cognitive 28) src/scene/gsplat-unified/gsplat-world.js:948— 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 961). 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:607— 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:1456— 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.
renderLayerRenderStep (cognitive 28) src/scene/renderer/render-pass-forward.js:549— renderLayerRenderStep has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, other 2, ternaries 2 (nesting depth added 10). Of this number, 25 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.
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.
AnimClip._update (cognitive 27) src/framework/anim/evaluator/anim-clip.js:226— AnimClip._update has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4 (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.
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:999— 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.
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:1294— 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.
_getSelection (cognitive 26) src/extras/gizmo/gizmo.js:717— _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.
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:410— 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:743— 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.
_updateEnvOptions (cognitive 25) src/scene/materials/standard-material-options-builder.js:290— _updateEnvOptions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (14 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.
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.
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:3218— 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.
VoxelOccupancy._decodeBlocks (cognitive 24) src/extras/voxel/voxel-occupancy.js:564— VoxelOccupancy._decodeBlocks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (11 pts), boolean chains 1, ternaries 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.
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.
_createProjectorCompute (cognitive 24) src/scene/gsplat-unified/gsplat-projector.js:413— _createProjectorCompute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 8, other 3, boolean chains 1 (nesting depth added 1). Of this number, 21 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.
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.
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:1360— 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:3326— 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.
SpriteComponentSystem.initializeComponentData (cognitive 23) src/framework/components/sprite/system.js:152— SpriteComponentSystem.initializeComponentData has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18 (19 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.
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:2763— 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 2837, a function literal at line 2830, 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:620— 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.
GSplatManager.update (cognitive 22) src/scene/gsplat-unified/gsplat-manager.js:740— GSplatManager.update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2, ternaries 1 (nesting depth added 6). Of this number, 20 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.
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:2048— 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:3126— 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:835— 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.
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:2529— 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:1042— _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.
_cullEntry (cognitive 22) src/scene/gsplat-unified/gsplat-shadow-renderer.js:557— _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.
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.
_intersectsRay (cognitive 22) src/core/shape/bounding-box.js:186— _intersectsRay has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 7, 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.
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:442— 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.
CameraComponentSystem.initializeComponentData (cognitive 21) src/framework/components/camera/system.js:106— 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:341— 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:793— 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:1965— 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:2252— 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:314— 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.
init (cognitive 20) src/framework/app-base.js:598— 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:2052— 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:1121— 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.
decompress (cognitive 20) src/scene/gsplat/gsplat-sog-data.js:326— decompress has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 3 (6 pts), ternaries 4 (6 pts), boolean chains 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.
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.
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:919— 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:206— 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.
WebgpuMipmapRenderer.generate (cognitive 19) src/platform/graphics/webgpu/webgpu-mipmap-renderer.js:193— WebgpuMipmapRenderer.generate has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (10 pts), loops 3 (4 pts), if/else 3, boolean chains 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.
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.
destroy (cognitive 19) src/framework/app-base.js:2044— destroy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 2 (3 pts), error handling 1 (2 pts), other 1 (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.
_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.
LightsBuffer.addLightData (cognitive 18) src/scene/lighting/lights-buffer.js:200— LightsBuffer.addLightData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, 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.
MaterialHandler._onCubemapRemoveOrUnload (cognitive 18) src/framework/handlers/material.js:229— MaterialHandler._onCubemapRemoveOrUnload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (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.
ScriptHandler._loadModule (cognitive 18) src/framework/handlers/script.js:139— 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 154). 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:581— 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:182— 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.
WorldClustersDebug._renderCells (cognitive 18) src/extras/debug/world-clusters-debug.js:225— WorldClustersDebug._renderCells has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 4 (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.
WebgpuGraphicsDevice.createDevice (cognitive 18) src/platform/graphics/webgpu/webgpu-graphics-device.js:655— 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.
frameUpdate (cognitive 18) src/extras/effects/dynamic-sky/dynamic-sky-effect.js:1790— 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.
frameStart (cognitive 18) src/platform/graphics/graphics-device.js:1927— 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 1949, a function literal at line 1973, a function literal at line 1931, …). 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.
renderForwardPrepareMaterials (cognitive 18) src/scene/renderer/forward-renderer.js:197— 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:128— _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.
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.
GSplatOctree.flushRequests (cognitive 17) src/scene/gsplat-unified/gsplat-octree.js:726— 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.
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:1869— 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.
_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.
constructor (cognitive 17) src/scene/gsplat-unified/gsplat-octree.js:223— constructor has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 pts), boolean chains 4, if/else 3 (4 pts), loops 2 (nesting depth added 4). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 251, 230). 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.
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.
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:886— 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.
SogParser.loadTextures (cognitive 16) src/framework/parsers/sog.js:127— SogParser.loadTextures has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 2, boolean chains 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 3 belong to 2 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.
AnimTargetValue.updateValue (cognitive 16) src/framework/anim/evaluator/anim-target-value.js:88— AnimTargetValue.updateValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (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.
ShaderUtils.createShader (cognitive 16) src/scene/shader-lib/shader-utils.js:93— ShaderUtils.createShader has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (12 pts), boolean chains 3, if/else 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.
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.
_precompileFrame (cognitive 16) src/framework/app-base.js:1337— _precompileFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 1 (3 pts), other 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.
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.
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.
_updateMaterialOptions (cognitive 16) src/scene/materials/standard-material-options-builder.js:202— _updateMaterialOptions has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 15, ternaries 1. Of this number, 14 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.
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 (75 clone groups) src/framework/components/gsplat/component.js:424— 75 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 53 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 75 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 75 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 75 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 (42 clone groups) scripts/esm/parsers/obj-model.mjs:31— 42 duplicated blocks under the repository root have copies in at least two of the sibling directories scripts, src — 18 of them are reported below, and 24 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 42 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 42 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 42 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 (21 clone groups) src/extras/effects/auto-exposure/passes/render-pass-histogram-step.js:43— 21 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 10 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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:960— 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) — 10 of them are reported below, and 7 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:281— 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 (171 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 — 171 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:110 — 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 (103 matched lines × 2 locations) · ×1
Duplicated block with local edits (103 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 — 723 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 (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 (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 (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.
R10 · Code Duplication· Duplicated block with local edits (63 matched lines × 2 locations) · ×1
Duplicated block with local edits (63 matched lines × 2 locations) src/scene/light.js:627— src/scene/light.js:627 · src/scene/lighting/lighting-params.js:169 — the two spans are one implementation copied and then locally edited — 273 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:171— src/extras/input/sources/dual-gesture-source.js:171 · src/extras/input/sources/single-gesture-source.js:132 — 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.
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 (43 matched lines × 2 locations) · ×1
Duplicated block with local edits (43 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:240 — the two spans are one implementation copied and then locally edited — 255 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:94— src/extras/input/sources/dual-gesture-source.js:94 · src/extras/input/sources/single-gesture-source.js:60 — 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.
Duplicated block (37 lines × 2 locations) scripts/esm/gsplat/reveal-grid-eruption.mjs:339— scripts/esm/gsplat/reveal-grid-eruption.mjs:339 · scripts/esm/gsplat/reveal-rain.mjs:385 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
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:1559— _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:310— 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 constructor (cyclomatic 44, cognitive 45) src/platform/graphics/texture.js:320— constructor has cyclomatic complexity 44 and cognitive complexity 45; 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 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.
Complex function readAttachment (cyclomatic 42, cognitive 68) scripts/spine/playcanvas-spine.4.3.js:9966— readAttachment has cyclomatic complexity 42 and cognitive complexity 68; 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 parseSpriteSheet (cyclomatic 42, cognitive 43) src/framework/parsers/sprite-sheet.js:40— parseSpriteSheet has cyclomatic complexity 42 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 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 computeWorldPositions (cyclomatic 41, cognitive 87) scripts/spine/playcanvas-spine.4.3.js:7450— computeWorldPositions has cyclomatic complexity 41 and cognitive complexity 87; 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 _setupLightingDefines (cyclomatic 41, cognitive 87) src/scene/shader-lib/programs/lit-shader.js:428— _setupLightingDefines has cyclomatic complexity 41 and cognitive complexity 87; 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 draw (cyclomatic 40, cognitive 149) src/platform/graphics/webgl/webgl-graphics-device.js:2288— draw has cyclomatic complexity 40 and cognitive complexity 149; 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 onContactPair (cyclomatic 40, cognitive 96) src/framework/components/rigid-body/system.js:882— onContactPair has cyclomatic complexity 40 and cognitive complexity 96; 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 rebuildGeometry (cyclomatic 40, cognitive 66) src/extras/mini-stats/mini-stats.js:792— rebuildGeometry has cyclomatic complexity 40 and cognitive complexity 66; 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 applyToSlot (cyclomatic 39, cognitive 116) scripts/spine/playcanvas-spine.4.3.js:3215— applyToSlot has cyclomatic complexity 39 and cognitive complexity 116; 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 _applyTreeCut (cyclomatic 39, cognitive 85) src/scene/gsplat-unified/gsplat-octree-instance.js:753— _applyTreeCut has cyclomatic complexity 39 and cognitive complexity 85; 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 drain (cyclomatic 39, cognitive 76) scripts/spine/playcanvas-spine.4.3.js:5129— drain has cyclomatic complexity 39 and cognitive complexity 76; 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 inc (cyclomatic 37, cognitive 61) scripts/spine/playcanvas-spine.4.3.js:14642— inc has cyclomatic complexity 37 and cognitive complexity 61; 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 raycast (cyclomatic 37, cognitive 51) src/extras/voxel/voxel-occupancy.js:360— raycast has cyclomatic complexity 37 and cognitive complexity 51; 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 (anonymous) (cyclomatic 36, cognitive 102) src/scene/gsplat/gsplat-sort-worker.js:211— (anonymous) has cyclomatic complexity 36 and cognitive complexity 102; 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 log (cyclomatic 36, cognitive 88) src/platform/graphics/render-pass.js:794— log has cyclomatic complexity 36 and cognitive complexity 88; 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 buildFrameGraph (cyclomatic 36, cognitive 74) src/scene/renderer/forward-renderer.js:644— buildFrameGraph has cyclomatic complexity 36 and cognitive complexity 74; 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 start (cyclomatic 35, cognitive 56) src/framework/xr/xr-manager.js:537— start has cyclomatic complexity 35 and cognitive complexity 56; 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 create (cyclomatic 34, cognitive 97) src/scene/batching/batch-manager.js:687— create has cyclomatic complexity 34 and cognitive complexity 97; 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 render (cyclomatic 34, cognitive 68) scripts/spine/playcanvas-spine.4.3.js:13744— render has cyclomatic complexity 34 and cognitive complexity 68; 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 34, cognitive 42) src/scene/gsplat/gsplat-sort-worker.js:46— update has cyclomatic complexity 34 and cognitive complexity 42; 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 draw (cyclomatic 34, cognitive 24) src/extras/renderers/texture-renderer.js:228— draw has cyclomatic complexity 34 and cognitive complexity 24; 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 bakeInternal (cyclomatic 33, cognitive 97) src/framework/lightmapper/lightmapper.js:935— bakeInternal has cyclomatic complexity 33 and cognitive complexity 97; 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: 2958 lines of code src/platform/graphics/webgl/webgl-graphics-device.js:1— src/platform/graphics/webgl/webgl-graphics-device.js has 2958 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: 2364 lines of code src/scene/materials/standard-material.js:1— src/scene/materials/standard-material.js has 2364 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: 2180 lines of code src/platform/graphics/constants.js:1— src/platform/graphics/constants.js has 2180 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: 2104 lines of code src/framework/components/particle-system/component.js:1— src/framework/components/particle-system/component.js has 2104 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: 2055 lines of code src/framework/app-base.js:1— src/framework/app-base.js has 2055 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: 1992 lines of code src/platform/graphics/webgpu/webgpu-graphics-device.js:1— src/platform/graphics/webgpu/webgpu-graphics-device.js has 1992 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: 1893 lines of code src/platform/graphics/graphics-device.js:1— src/platform/graphics/graphics-device.js has 1893 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: 1887 lines of code src/extras/effects/dynamic-sky/dynamic-sky-effect.js:1— src/extras/effects/dynamic-sky/dynamic-sky-effect.js has 1887 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: 1885 lines of code src/scene/mesh-instance.js:1— src/scene/mesh-instance.js has 1885 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: 1748 lines of code src/scene/graph-node.js:1— src/scene/graph-node.js has 1748 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: 1556 lines of code src/platform/graphics/texture.js:1— src/platform/graphics/texture.js has 1556 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: 1525 lines of code src/framework/components/camera/component.js:1— src/framework/components/camera/component.js has 1525 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/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: 1289 lines of code src/scene/constants.js:1— src/scene/constants.js has 1289 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: 1273 lines of code src/scene/renderer/renderer.js:1— src/scene/renderer/renderer.js has 1273 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.
R3 · Large Files· src/scene/gsplat-unified/gsplat-octree-instance.js · ×1
src/scene/gsplat-unified/gsplat-octree-instance.js: 1189 lines of code src/scene/gsplat-unified/gsplat-octree-instance.js:1— src/scene/gsplat-unified/gsplat-octree-instance.js has 1189 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.
src/scene/camera.js: 1156 lines of code src/scene/camera.js:1— src/scene/camera.js has 1156 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.
R3 · Large Files· src/scene/gsplat-unified/gsplat-world.js · ×1
src/scene/gsplat-unified/gsplat-world.js: 1135 lines of code src/scene/gsplat-unified/gsplat-world.js:1— src/scene/gsplat-unified/gsplat-world.js has 1135 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: 1121 lines of code src/scene/light.js:1— src/scene/light.js has 1121 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: 1109 lines of code src/framework/components/render/component.js:1— src/framework/components/render/component.js has 1109 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: 1055 lines of code src/scene/gsplat-unified/gsplat-params.js:1— src/scene/gsplat-unified/gsplat-params.js has 1055 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: 1041 lines of code src/framework/input/element-input.js:1— src/framework/input/element-input.js has 1041 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.
Dead file (~484 LoC) examples/utils/generate-vfx-textures.mjs— no import path from any entry point (146 application, 12 tooling, 355 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 (~422 LoC) examples/utils/generate-ui-atlas.mjs— no import path from any entry point (146 application, 12 tooling, 355 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, 355 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
redundant comment scripts/camera/follow-camera.js:66— "Look at the target entity from the new position" repeats the code it sits on: 4 of its 5 words (look, target, entity, position) are already in `this.entity.lookAt(this.target.getPosition());`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/camera/orbit-camera.js:1— "Orbit Camera Script //" repeats the code it sits on: 3 of its 3 words (orbit, camera, script) are already in `var OrbitCamera = pc.createScript('orbitCamera');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/camera/orbit-camera.js:399— "Orbit Camera Mouse Input Script //" repeats the code it sits on: 5 of its 5 words (orbit, camera, mouse, input, script) are already in `var OrbitCameraInputMouse = pc.createScript('orbitCameraInputMouse');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/camera/orbit-camera.js:537— "Orbit Camera Touch Input Script //" repeats the code it sits on: 5 of its 5 words (orbit, camera, touch, input, script) are already in `var OrbitCameraInputTouch = pc.createScript('orbitCameraInputTouch');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/annotations.mjs:675— "Create base entity" repeats the code it sits on: 3 of its 3 words (create, base, entity) are already in `const baseEntity = new Entity('base');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/annotations.mjs:684— "Create overlay entity" repeats the code it sits on: 3 of its 3 words (create, overlay, entity) are already in `const overlayEntity = new Entity('overlay');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/annotations.mjs:696— "Create hotspot DOM" repeats the code it sits on: 3 of its 3 words (create, hotspot, dom) are already in `const hotspotDom = document.createElement('div');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/blurred-planar-reflection.mjs:479— 6 comments in this file only repeat the code they sit on (lines 479, 486, 496, 673, 706, 743), for example "Create reflection depth camera". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/camera-controls.mjs:996— "apply dead zone to gamepad sticks" repeats the code it sits on: 5 of its 5 words (apply, dead, zone, gamepad, sticks) are already in `applyDeadZone(leftStick, this.gamepadDeadZone.x, this.gamepadDeadZone.y);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/first-person-controller.mjs:471— "apply dead zone to gamepad sticks" repeats the code it sits on: 4 of its 5 words (apply, dead, zone, sticks) are already in `applyDeadZone(leftStick, this.gamePadDeadZoneLow, this.gamePadDeadZoneHigh);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/gsplat/gsplat-flipbook.mjs:266— "Maintain preload buffer" repeats the code it sits on: 3 of its 3 words (maintain, preload, buffer) are already in `this.maintainPreloadBuffer();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/gsplat/shader-effect-box.mjs:374— "Set LUT texture uniform" repeats the code it sits on: 4 of its 4 words (set, lut, texture, uniform) are already in `this.setUniform('uLUT', this._lutTexture);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/gsplat/shader-effect-crop.mjs:166— "Set edge scale factor" repeats the code it sits on: 4 of its 4 words (set, edge, scale, factor) are already in `this.setUniform('uEdgeScaleFactor', this.edgeScaleFactor);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/planar-renderer.mjs:233— "sceneCameraEntity needs to be set" repeats the code it sits on: 4 of its 5 words (scene, camera, entity, set) are already in `const sceneCamera = this.sceneCameraEntity?.camera;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/shadow-catcher.mjs:75— "create shadow catcher material" repeats the code it sits on: 4 of its 4 words (create, shadow, catcher, material) are already in `const shadowCatcherMaterial = new StandardMaterial();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/xr/xr-menu.mjs:1212— "Offset the menu along the palm normal (in front of palm)" repeats the code it sits on: 4 of its 5 words (offset, menu, palm, normal) are already in `tmpVec3A.copy(palmNormal).mulScalar(this.menuOffset.z);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/esm/xr/xr-menu.mjs:1477— "Find the preferred input source" repeats the code it sits on: 4 of its 4 words (find, preferred, input, source) are already in `const inputSource = this._findPreferredInput();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/physics/vehicle.js:77— "Add the vehicle to the dynamics world" repeats the code it sits on: 4 of its 4 words (add, vehicle, dynamics, world) are already in `dynamicsWorld.addAction(vehicle);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/utils/mac-gpu-profiling.js:77— "Create a command encoder" repeats the code it sits on: 3 of its 3 words (create, command, encoder) are already in `const commandEncoder = this.device.createCommandEncoder();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/utils/planar-renderer.js:55— "sceneCameraEntity needs to be set" repeats the code it sits on: 4 of its 5 words (scene, camera, entity, set) are already in `var sceneCamera = this.sceneCameraEntity.camera;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/core/block-allocator.js:683— "Insert freed region into main list" repeats the code it sits on: 4 of its 5 words (insert, freed, main, list) are already in `this._insertAfterInMainList(freed, prev);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:117— "remove empty lines" repeats the code it sits on: 3 of its 3 words (remove, empty, lines) are already in `source = this.RemoveEmptyLines(source);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:120— "process array sizes" repeats the code it sits on: 3 of its 3 words (process, array, sizes) are already in `source = this.processArraySize(source, intDefines);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/core/wasm-module.js:43— "load a wasm module" repeats the code it sits on: 3 of its 3 words (load, wasm, module) are already in `static loadWasm(moduleName, config, callback)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/extras/effects/volumetric-fog/passes/frame-pass-volumetric-fog.js:298— "a light with shadow bounds renders one shadow for all cameras" repeats the code it sits on: 5 of its 5 words (light, shadow, bounds, renders, cameras) are already in `lightRenderData = light.getRenderData(light.shadowBounds ? null : camera, 0);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Duplicated predicate src/platform/graphics/webgl/webgl-graphics-device.js:3127— `!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:378— `!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:906— `!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 scripts/esm/parsers/spz-parser.mjs:613— `!this.app?.graphicsDevice || this.app.graphicsDevice._destroyed` appears character-identically in 3 files — scripts/esm/parsers/spz-parser.mjs, 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:202— `(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:298— `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:474— `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:105— 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:331— 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/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/scene/shader-lib/glsl/chunks/particle/vert/particle.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.
IC1 · Incompleteness & stubs· Empty method body · ×4
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.
Empty method body src/platform/graphics/null/null-graphics-device.js:85— `updateBegin` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body src/platform/graphics/null/null-graphics-device.js:88— `updateEnd` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body src/platform/graphics/null/null-graphics-device.js:188— `popMarker` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 186 significant file(s) lose their only recent owner: src/platform/graphics/webgpu/webgpu-graphics-device.js, src/extras/effects/dynamic-sky/dynamic-sky-effect.js, src/platform/graphics/graphics-device.js, src/scene/gsplat-unified/gsplat-octree-instance.js, src/extras/render-passes/frame-pass-camera-frame.js, src/scene/light.js, src/framework/lightmapper/lightmapper.js, src/scene/gsplat-unified/gsplat-params.js (+178 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 40 significant file(s) lose their only recent owner: src/framework/components/joint/component.js, src/framework/components/rigid-body/system.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, src/framework/font/canvas-font.js (+32 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.
R7 · Dead Code· Unused module-local declaration 'T1' · ×2
Unused module-local declaration 'T1' test/type-tests/anim-component.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.
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' · ×2
Unused module-local declaration 'T2' test/type-tests/anim-component.test.ts:18— 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.
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.
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 (233 single-owned of 702 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; 702 of the 1393 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.
D21 · Naming Consistency· `getGlslShaderType` spells `Glsl` where 17 names in the project spell it `GLSL` · ×1
`getGlslShaderType` spells `Glsl` where 17 names in the project spell it `GLSL` src/platform/graphics/constants.js:1263— 17 of 18 names in project playcanvas spell the token `GLSL` (17 of 18; unit: names in project playcanvas containing `GLSL`). Peers: GSplatShaderEffect.getShaderGLSL (scripts/esm/gsplat/gsplat-shader-effect.mjs:203); GSplatShaderEffect.getFragmentShaderGLSL (scripts/esm/gsplat/gsplat-shader-effect.mjs:221); GSplatRevealGridEruption.getShaderGLSL (scripts/esm/gsplat/reveal-grid-eruption.mjs:355); GSplatRevealRadial.getShaderGLSL (scripts/esm/gsplat/reveal-radial.mjs:356); GSplatRevealRain.getShaderGLSL (scripts/esm/gsplat/reveal-rain.mjs:401). Rename to `getGLSLShaderType`. [rule N6]
D21 · Naming Consistency· `getWgslShaderType` spells `Wgsl` where 20 names in the project spell it `WGSL` · ×1
`getWgslShaderType` spells `Wgsl` where 20 names in the project spell it `WGSL` src/platform/graphics/constants.js:1277— 20 of 22 names in project playcanvas spell the token `WGSL` (20 of 22; unit: names in project playcanvas containing `WGSL`). Peers: GSplatShaderEffect.getShaderWGSL (scripts/esm/gsplat/gsplat-shader-effect.mjs:212); GSplatShaderEffect.getFragmentShaderWGSL (scripts/esm/gsplat/gsplat-shader-effect.mjs:230); GSplatRevealGridEruption.getShaderWGSL (scripts/esm/gsplat/reveal-grid-eruption.mjs:359); GSplatRevealRadial.getShaderWGSL (scripts/esm/gsplat/reveal-radial.mjs:360); GSplatRevealRain.getShaderWGSL (scripts/esm/gsplat/reveal-rain.mjs:405). Rename to `getWGSLShaderType`. [rule N6]
D21 · Naming Consistency· `_userModifyWgsl` spells `Wgsl` where 20 names in the project spell it `WGSL` · ×1
`_userModifyWgsl` spells `Wgsl` where 20 names in the project spell it `WGSL` src/scene/gsplat-unified/gsplat-shadow-renderer.js:150— 20 of 22 names in project playcanvas spell the token `WGSL` (20 of 22; unit: names in project playcanvas containing `WGSL`). Peers: GSplatShaderEffect.getShaderWGSL (scripts/esm/gsplat/gsplat-shader-effect.mjs:212); GSplatShaderEffect.getFragmentShaderWGSL (scripts/esm/gsplat/gsplat-shader-effect.mjs:230); GSplatRevealGridEruption.getShaderWGSL (scripts/esm/gsplat/reveal-grid-eruption.mjs:359); GSplatRevealRadial.getShaderWGSL (scripts/esm/gsplat/reveal-radial.mjs:360); GSplatRevealRain.getShaderWGSL (scripts/esm/gsplat/reveal-rain.mjs:405). Rename to `_userModifyWGSL`. [rule N6]
D21 · Naming Consistency· `FakeXRSession` spells `XR` where 24 names in the project spell it `Xr` · ×1
`FakeXRSession` spells `XR` where 24 names in the project spell it `Xr` test/framework/xr/fake-webxr.mjs:78— 24 of 26 names in project playcanvas spell the token `Xr` (24 of 26; unit: names in project playcanvas containing `Xr`). Peers: example.placeForSceneXr (examples/src/examples/gaussian-splatting/vr-lod/example.mjs:556); example.setCameraControlsForXr (examples/src/examples/gaussian-splatting/vr-lod/example.mjs:605); XrControllers._onXrEnd (scripts/esm/xr/xr-controllers.mjs:149); XrMenu._onXrEnd (scripts/esm/xr/xr-menu.mjs:479); XrSession.onXrStart (scripts/esm/xr/xr-session.mjs:201). Rename to `FakeXrSession`. [rule N6]
D21 · Naming Consistency· `FakeXRSystem` spells `XR` where 24 names in the project spell it `Xr` · ×1
`FakeXRSystem` spells `XR` where 24 names in the project spell it `Xr` test/framework/xr/fake-webxr.mjs:177— 24 of 26 names in project playcanvas spell the token `Xr` (24 of 26; unit: names in project playcanvas containing `Xr`). Peers: example.placeForSceneXr (examples/src/examples/gaussian-splatting/vr-lod/example.mjs:556); example.setCameraControlsForXr (examples/src/examples/gaussian-splatting/vr-lod/example.mjs:605); XrControllers._onXrEnd (scripts/esm/xr/xr-controllers.mjs:149); XrMenu._onXrEnd (scripts/esm/xr/xr-menu.mjs:479); XrSession.onXrStart (scripts/esm/xr/xr-session.mjs:201). Rename to `FakeXrSystem`. [rule N6]
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 9 of 702 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; 702 of the 1393 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/i18n/utils.js, src/scene/shader-lib/glsl/chunks/lit/frag/iridescenceDiffraction.js, src/scene/shader-lib/glsl/chunks/particle/vert/particle.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.
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:7— 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 6 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.)
R7 · Dead Code· Unused export 'EXAMPLE_TARGET' · ×1
Unused export 'EXAMPLE_TARGET' examples/utils/build-examples.mjs:68— Nothing imports this binding — it is safe to review for removal.
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:182— 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 '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/2 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) 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:121— `jsonImages` 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): uses the clear coat LTC matrix for area lights of every shape test/scene/shader-lib/lit-clearcoat-area-lights.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): applies the clear coat strength with area lights test/scene/shader-lib/lit-clearcoat-area-lights.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): 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:1002— 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:131— 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
doc comments repeat the names scripts/esm/anim/anim-update-optimizer.mjs:232— 474 of 6616 documented parameters and 163 of 9287 summaries in `playcanvas` only repeat the member or parameter name (e.g. "The entity." for `entity`). Delete the restating tags, or add what the name does not say.
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 01a1dd8c-cfa5-7de4-acfa-66e345d98161 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 52 · Warnings: 1094 · Recommendations: 289 · Info: 30 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 15-11-2026 @ 04:52 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.