Public report — engine, published 1 Oct 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this survey Filed cd_ceb923e33622424abd1d67d90c7231bf Filed 1 October 2026, 22:00 UTC Public

Playcanvas/engine

Measured 1 October 2026, 20:55 UTC

61% Adequate
CriticalWeakAdequateStrongExemplary

Large · 328,159 LoC · 1 projects · rebuild ~3.0 person-years · weakest lens: Security (58%)

Findings by grade

48 critical 983 serious 56 minor 32 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
1 October 2026, 20:55 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

47/51dimensions tool-verifieddeterministic · confidence 1.0 · 4 LLM-assisted, advisory
1072findings with an exact file:lineof 1087 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
51/132dimensions across the health lenses328159 LoC · 1 projects — wide & deep
Chapters

Executive summary

The system holds an adequate standing with a health score of 61%, but it carries significant hidden risks that threaten delivery speed and security. This is a large, complex asset with over 328,000 lines of production code, representing a substantial investment. Rebuilding it from scratch would cost approximately €430,000 and require three person-years, highlighting the high value tied up in its current state. While the architecture is robust, the overall health is dragged down by specific operational and security weaknesses that demand immediate attention.

The most critical issue is security exposure. With a security score of 58%, this large asset is vulnerable to operational and business risks. The presence of secrets in history and an end-of-life runtime creates a fragile foundation. For a system of this size, security is not just a technical detail but a core business risk. Remediation here buys the most protection against potential outages and data breaches, making it the highest priority for leadership focus.

A second theme is the velocity tax on every change. The code quality signals indicate a moderate complexity that acts as a drag on development. Modifications in weaker areas likely cost 2–5% more effort than in clean code. This tax compounds as the codebase grows, slowing down feature delivery and increasing long-term maintenance costs. The presence of fragile change hotspots, which are under-tested or single-owner, amplifies this risk, making changes there particularly dangerous and costly.

Despite these risks, the system has genuine strengths. The architecture scores 88%, indicating a solid structural foundation that supports change without excessive ripple effects. This stability is a valuable asset that should be preserved. However, the current state is not sustainable without addressing the identified weaknesses. The picture is partial, as several key areas like domain modeling and event-driven design were not measured, leaving some risks unquantified.

The first action should be to resolve the security findings, particularly the secrets in history and the end-of-life runtime. This has the highest leverage, as it directly addresses the most critical business risk. Following this, the team should address the velocity tax by replacing synchronous APIs with asynchronous ones. This single change pays for itself within months by reducing the annual drag on development. Focusing on these high-impact areas will stabilize the system and improve delivery speed without requiring a costly rebuild.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Security 58% · 46% weightPerformance 60% · 25% weightReadiness 64% · 14% weightMaturity 66% · 8% weightCode Health 68% · 4% weightArchitecture 88% · 2% weight

Raise Security 58 → 70 (the Healthy floor) ⇒ headline 61 → ~63.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

105 finding(s) are new versus the previous scan (2026-09-16) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D1 · start (cyclomatic 37) src/framework/xr/xr-manager.js
  • D1 · update (cyclomatic 32) src/framework/handlers/cubemap.js
  • D1 · render-physics.RenderPhysics.postUpdate (cyclomatic 29) scripts/physics/render-physics.js
  • D1 · draw (cyclomatic 27) src/platform/graphics/webgpu/webgpu-graphics-device.js
  • D1 · initFromGpuDevice (cyclomatic 24) src/platform/graphics/webgpu/webgpu-graphics-device.js
  • D1 · tween.Tween.start (cyclomatic 22) scripts/animation/tween.js
  • D1 · init (cyclomatic 20) src/framework/app-base.js
  • D1 · GSplatProjector.dispatch (cyclomatic 19) src/scene/gsplat-unified/gsplat-projector.js
  • D1 · StandardMaterialMapTransforms.update (cyclomatic 18) src/scene/materials/standard-material-map-transforms.js
  • D1 · MeshInstance.getMaterialBindGroup (cyclomatic 18) src/scene/mesh-instance.js
  • D1 · evaluateNodeDistances (cyclomatic 18) src/scene/gsplat-unified/gsplat-octree-instance.js
  • D1 · GSplatBudgetBalancer._accumulate (cyclomatic 17) src/scene/gsplat-unified/gsplat-budget-balancer.js
  • D1 · ShadowRenderer.submitCasters (cyclomatic 17) src/scene/renderer/shadow-renderer.js
  • D1 · _updateTexOptions (cyclomatic 17) src/scene/materials/standard-material-options-builder.js
  • D1 · renderLayerRenderStep (cyclomatic 17) src/scene/renderer/render-pass-forward.js
  • D1 · tween.Tween.initialize (cyclomatic 16) scripts/animation/tween.js
  • D1 · ShaderGeneratorStandard._addMapDefines (cyclomatic 16) src/scene/shader-lib/programs/standard.js
  • D1 · GSplatWorld.applyWorkBufferUpdates (cyclomatic 16) src/scene/gsplat-unified/gsplat-world.js
  • D1 · ShaderProcessorGLSL.processUniforms (cyclomatic 16) src/platform/graphics/shader-processor-glsl.js
  • D2 · GSplatDirector.update (cognitive 64) src/scene/gsplat-unified/gsplat-director.js
  • D2 · render-physics.RenderPhysics.postUpdate (cognitive 60) scripts/physics/render-physics.js
  • D2 · draw (cognitive 56) src/platform/graphics/webgpu/webgpu-graphics-device.js
  • D2 · update (cognitive 55) src/framework/handlers/cubemap.js
  • D2 · GSplatLodTable.constructor (cognitive 38) src/scene/gsplat-unified/gsplat-lod-table.js
  • D2 · update (cognitive 38) src/scene/gsplat-unified/gsplat-world.js
  • D2 · GSplatBudgetBalancer._accumulate (cognitive 37) src/scene/gsplat-unified/gsplat-budget-balancer.js
  • D2 · ShadowRenderer.submitCasters (cognitive 31) src/scene/renderer/shadow-renderer.js
  • D2 · basis.prepareWorkerModules (cognitive 28) src/framework/handlers/basis.js
  • D2 · LightSlotUniforms.appendFormats (cognitive 27) src/scene/lighting/light-slot-uniforms.js
  • D2 · evaluateNodeDistances (cognitive 26) src/scene/gsplat-unified/gsplat-octree-instance.js
  • D2 · tween.Tween.initialize (cognitive 25) scripts/animation/tween.js
  • D2 · XrControllers.update (cognitive 25) scripts/esm/xr/xr-controllers.mjs
  • D2 · orbit-camera.OrbitCamera._buildAabb (cognitive 24) scripts/camera/orbit-camera.js
  • D2 · StandardMaterialMapTransforms.collectUnapplied (cognitive 23) src/scene/materials/standard-material-map-transforms.js
  • D2 · Atlas.upload (cognitive 22) src/framework/font/canvas-font.js
  • D2 · get (cognitive 22) src/platform/graphics/webgpu/webgpu-render-pipeline.js
  • D2 · LightSlotUniforms._dispatchDirectional (cognitive 21) src/scene/lighting/light-slot-uniforms.js
  • D2 · BindGroup._revalidate (cognitive 20) src/platform/graphics/bind-group.js
  • D2 · StandardMaterialMapTransforms.update (cognitive 20) src/scene/materials/standard-material-map-transforms.js
  • D2 · MeshInstance.getMaterialBindGroup (cognitive 20) src/scene/mesh-instance.js
  • D2 · basis.basisInitialize (cognitive 20) src/framework/handlers/basis.js
  • D2 · initFromGpuDevice (cognitive 20) src/platform/graphics/webgpu/webgpu-graphics-device.js
  • D2 · init (cognitive 20) src/framework/app-base.js
  • D2 · XrView._updateDepth (cognitive 19) src/framework/xr/xr-view.js
  • D2 · OutlineRenderer.getMeshInstances (cognitive 19) src/extras/renderers/outline-renderer.js
  • D2 · WebgpuGraphicsDevice.createDevice (cognitive 18) src/platform/graphics/webgpu/webgpu-graphics-device.js
  • D2 · _updateTexOptions (cognitive 18) src/scene/materials/standard-material-options-builder.js
  • D2 · GSplatOctree.flushRequests (cognitive 17) src/scene/gsplat-unified/gsplat-octree.js
  • D2 · usdz-exporter.skinVertices (cognitive 17) src/extras/exporters/usdz-exporter.js
  • D2 · _prepareUniformBuffer (cognitive 17) src/scene/materials/material.js
  • D2 · MeshInstanceStorage._uploadDirtySlots (cognitive 16) src/platform/graphics/mesh-instance-storage.js
  • D2 · SphereGeometry.constructor (cognitive 16) src/scene/geometry/sphere-geometry.js
  • D2 · ScriptHandler._loadModule (cognitive 16) src/framework/handlers/script.js
  • D2 · destroy (cognitive 16) src/framework/app-base.js
  • D2 · constructor (cognitive 16) src/scene/gsplat-unified/gsplat-octree.js
  • D3 · TooManyMethods: Material src/scene/materials/material.js
  • D3 · TooManyMethods: MeshInstance src/scene/mesh-instance.js
  • D3 · ClassTooLong: GSplatHybridRenderer src/scene/gsplat-unified/gsplat-hybrid-renderer.js
  • D3 · ClassTooLong: Material src/scene/materials/material.js
  • D3 · FileTooLong: batching/batch-manager.js src/scene/batching/batch-manager.js
  • D6 · Low cohesion: CollisionComponentSystem (LCOM4 10) src/framework/components/collision/system.js
  • D6 · Low cohesion: GraphNode (LCOM4 7) src/scene/graph-node.js
  • D6 · Low cohesion: ElementComponent (LCOM4 6) src/framework/components/element/component.js
  • D6 · Low cohesion: ScreenComponentSystem (LCOM4 6) src/framework/components/screen/system.js
  • D6 · Low cohesion: Layer (LCOM4 6) src/scene/layer.js
  • D6 · Low cohesion: Renderer (LCOM4 5) src/scene/renderer/renderer.js
  • D6 · Low cohesion: JointComponentSystem (LCOM4 5) src/framework/components/joint/system.js
  • D6 · Low cohesion: Camera (LCOM4 5) src/scene/camera.js
  • D6 · Low cohesion: RotateGizmo (LCOM4 5) src/extras/gizmo/rotate-gizmo.js
  • D6 · Low cohesion: ShareDialog (LCOM4 4) examples/src/app/components/ShareDialog.mjs
  • D6 · Low cohesion: Scene (LCOM4 4) src/scene/scene.js
  • D6 · Low cohesion: GSplatCompressedData (LCOM4 4) src/scene/gsplat/gsplat-compressed-data.js
  • D6 · Low cohesion: CollisionComponent (LCOM4 4) src/framework/components/collision/component.js
  • D6 · Low cohesion: ImageElement (LCOM4 4) src/framework/components/element/image-element.js
  • D6 · Low cohesion: WebglTexture (LCOM4 4) src/platform/graphics/webgl/webgl-texture.js
  • D6 · Low cohesion: TranslateGizmo (LCOM4 4) src/extras/gizmo/translate-gizmo.js
  • D8 · Low coverage: src/framework/handlers/container.js src/framework/handlers/container.js
  • D10 · No assertions: supports an element that is a direct child of a screen space screen test/framework/components/element/element-drag-helper.test.mjs
  • D15 · Hotspot: src/scene/renderer/render-pass-forward.js src/scene/renderer/render-pass-forward.js
  • D15 · Hotspot: scripts/esm/xr/xr-navigation.mjs scripts/esm/xr/xr-navigation.mjs
  • D15 · Hotspot: src/framework/handlers/material.js src/framework/handlers/material.js
  • D15 · Hotspot: src/platform/graphics/shader-processor-glsl.js src/platform/graphics/shader-processor-glsl.js
  • D15 · Hotspot: examples/src/examples/materials/parallax-terrain.example.mjs examples/src/examples/materials/parallax-terrain.example.mjs
  • D15 · Repeated repair: examples/src/examples/gaussian-splatting/depth-of-field.example.mjs examples/src/examples/gaussian-splatting/depth-of-field.example.mjs
  • D29 · REDACTED
  • D29 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D35 · Boundary-crossing change coupling: deprecated.js ↔ blend-state.js src/deprecated/deprecated.js
  • D35 · Change coupling: stdDeclaration.js ↔ stdDeclaration.js src/scene/shader-lib/glsl/chunks/standard/frag/stdDeclaration.js
  • D35 · Change-coupling hub: gsplat-manager.js → compute-radix-sort-multipass.js, gsplat-info.js, gsplat-interval-compaction.js, gsplat-octree-instance.js, gsplat-projector.js, gsplat-unified-sort-worker.js, gsplat-work-buffer.js src/scene/gsplat-unified/gsplat-manager.js
  • D35 · 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
  • D35 · Change coupling: gsplat-work-buffer-render-pass.js ↔ gsplatCopyToWorkbuffer.js src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js
  • D35 · Change coupling: blend-state.js ↔ webgpu-graphics-device.js src/platform/graphics/blend-state.js
  • D35 · Change-coupling hub: forward-renderer.js → gpu-updater.js, shadow-renderer-directional.js, shadow-renderer-local.js, shadow-renderer.js, screenDepth.js src/scene/renderer/forward-renderer.js
  • D35 · Change coupling: gsplat-work-buffer-render-pass.js ↔ gsplatCopyToWorkbuffer.js src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js
  • D44 · End-of-life runtime: Node.js 18

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €140,000–€720,000
Cost to rebuild€140,000–€720,000 (1.4–4.5 person-years (2,391–7,586 h), ~1–6 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.8× (at 61% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~3.0 person-years of build effort (about ~€430,000 to rebuild). Its weakest lens is Security at 58% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (6).
+2.5 pts · Low effort · Secrets (history)
2
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life.
+2.1 pts · Low effort · Platform End-of-Life
3
Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5).
+1.4 pts · Low effort · Dependency Vulnerabilities

Diagnosis — what's actually going on

Fragile change-hotspots · High · Compound risk
8 hotspot file(s) are also under-tested or single-owner — change there is riskier than the headline suggests.
Evidence: D15 hotspots: 45 churn×complexity hotspot file(s) · D8 coverage: 147 file(s) under 50% coverage · D16 ownership: 0 file(s) ≥90% owned by one author · intersection: incl. webgl-graphics-device.js, text-element.js, gsplat-world.js, lightmapper.js, gsplat-projector.js
→ Prioritise tests + a second reviewer on the worst files (webgl-graphics-device.js, text-element.js, gsplat-world.js).
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 28–186.7 engineer-days every year, paid as drag on the ~560,238 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 2–5% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 138,141 line(s) changed over a 90-day window ⇒ ~560,238/year · D1/D2/D4/D6 code quality: averaging 7.2/10 ⇒ a 2–5% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Large asset (~3.0 person-years to rebuild), and its weakest lens is Security at 58%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~3.0 person-years rebuild (328,159 LoC) · weakest lens: Security 58%
→ Direct remediation budget at Security first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: 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. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ 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.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 7.2/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 2–5% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4/D6 code quality: averaging 7.2/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

763 modules, 295 dependencies. Every dependency points down the layering — no cycles.

Showing the 40 most-connected modules; 723 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 examples.src.app.components.code-editor.CodeEditorBase2 src.core.event-handler3 src.core.ref-counted-object4 src.extras.exporters.core-exporter5 src.extras.gizmo.shape.shape6 src.extras.input.input7 src.framework.anim.controller.anim-blend-tree8 src.framework.handlers.handler9 src.framework.lightmapper.bake-light10 src.framework.parsers.texture.texture11 src.framework.physics.physics-world12 src.platform.graphics.dynamic-buffer13 src.platform.graphics.dynamic-buffers14 src.platform.graphics.frame-pass15 src.platform.graphics.gpu-profiler16 src.platform.graphics.webgl.webgl-buffer17 src.platform.graphics.webgpu.webgpu-buffer18 src.platform.graphics.webgpu.webgpu-pipeline19 src.scene.geometry.geometry20 src.scene.graphics.radix-sort.compute-radix-sort-base21 src.scene.gsplat-unified.gsplat-renderer22 src.scene.gsplat.gsplat-resource-base23 src.scene.materials.material24 src.scene.shader-lib.programs.shader-generator25 src.core.ref-counted-key-cache26 src.extras.gizmo.gizmo27 src.framework.app-base28 src.framework.components.component29 src.framework.components.system30 src.framework.script.script31 src.platform.graphics.graphics-device32 src.platform.graphics.render-pass33 src.platform.sound.instance34 src.scene.geometry.cone-base-geometry35 src.scene.geometry.sphere-geometry36 src.scene.graph-node37 scripts.esm.gsplat.gsplat-shader-effect38 src.extras.gizmo.transform-gizmo39 src.scene.graphics.render-pass-shader-quad40 src.extras.render-passes.frame-pass-volumetric-fog
1 examples.src.app.components.code-editor.CodeEditorBase
2 src.core.event-handler
3 src.core.ref-counted-object
4 src.extras.exporters.core-exporter
5 src.extras.gizmo.shape.shape
6 src.extras.input.input
7 src.framework.anim.controller.anim-blend-tree
8 src.framework.handlers.handler
9 src.framework.lightmapper.bake-light
10 src.framework.parsers.texture.texture
11 src.framework.physics.physics-world
12 src.platform.graphics.dynamic-buffer
13 src.platform.graphics.dynamic-buffers
14 src.platform.graphics.frame-pass
15 src.platform.graphics.gpu-profiler
16 src.platform.graphics.webgl.webgl-buffer
17 src.platform.graphics.webgpu.webgpu-buffer
18 src.platform.graphics.webgpu.webgpu-pipeline
19 src.scene.geometry.geometry
20 src.scene.graphics.radix-sort.compute-radix-sort-base
21 src.scene.gsplat-unified.gsplat-renderer
22 src.scene.gsplat.gsplat-resource-base
23 src.scene.materials.material
24 src.scene.shader-lib.programs.shader-generator
25 src.core.ref-counted-key-cache1
26 src.extras.gizmo.gizmo1
27 src.framework.app-base1
28 src.framework.components.component1
29 src.framework.components.system1
30 src.framework.script.script1
31 src.platform.graphics.graphics-device1
32 src.platform.graphics.render-pass1
33 src.platform.sound.instance1
34 src.scene.geometry.cone-base-geometry1
35 src.scene.geometry.sphere-geometry1
36 src.scene.graph-node1
37 scripts.esm.gsplat.gsplat-shader-effect1
38 src.extras.gizmo.transform-gizmo1
39 src.scene.graphics.render-pass-shader-quad1
40 src.extras.render-passes.frame-pass-volumetric-fog13
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…editor.CodeEditorBasesrc.core.event-handler…re.ref-counted-object…porters.core-exporter…ras.gizmo.shape.shapesrc.extras.input.input…oller.anim-blend-tree…work.handlers.handler…ightmapper.bake-light…rsers.texture.texture…physics.physics-world…aphics.dynamic-buffer…phics.dynamic-buffers…m.graphics.frame-pass…graphics.gpu-profiler…cs.webgl.webgl-buffer….webgpu.webgpu-buffer…ebgpu.webgpu-pipeline…ene.geometry.geometry…mpute-radix-sort-base…ified.gsplat-renderer….gsplat-resource-base…ne.materials.material…rams.shader-generator…ref-counted-key-cachesrc.extras.gizmo.gizmosrc.framework.app-base….components.component…ork.components.system…amework.script.script…phics.graphics-device….graphics.render-pass…atform.sound.instance…ry.cone-base-geometry…metry.sphere-geometrysrc.scene.graph-node….gsplat-shader-effect…gizmo.transform-gizmo…nder-pass-shader-quad…e-pass-volumetric-fog…editor.CodeEditorBase1src.core.event-handler2…re.ref-counted-object3…porters.core-exporter4…ras.gizmo.shape.shape5src.extras.input.input6…oller.anim-blend-tree7…work.handlers.handler8…ightmapper.bake-light9…rsers.texture.texture10…physics.physics-world11…aphics.dynamic-buffer12…phics.dynamic-buffers13…m.graphics.frame-pass14…graphics.gpu-profiler15…cs.webgl.webgl-buffer16….webgpu.webgpu-buffer17…ebgpu.webgpu-pipeline18…ene.geometry.geometry19…mpute-radix-sort-base20…ified.gsplat-renderer21….gsplat-resource-base22…ne.materials.material23…rams.shader-generator24…ref-counted-key-cache25src.extras.gizmo.gizmo26src.framework.app-base27….components.component28…ork.components.system29…amework.script.script30…phics.graphics-device31….graphics.render-pass32…atform.sound.instance33…ry.cone-base-geometry34…metry.sphere-geometry35src.scene.graph-node36….gsplat-shader-effect37…gizmo.transform-gizmo38…nder-pass-shader-quad39…e-pass-volumetric-fog4011111111111111113+723 more modules (most-connected shown)

At a glance — Code Health · 68% · Adequate · gated by D2, D3 ·

At a glance — Architecture · 88% · Adequate · gated by D26 ·

At a glance — Maturity · 66% · Adequate · gated by M2 ·

At a glance — Readiness · 64% · Adequate · gated by P3 ·

At a glance — Security · 58% · Adequate · gated by D36 ·

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A03:2021 — Injection36High / Critical
A06:2021 — Vulnerable & Outdated Components8High / Critical
A02:2021 — Cryptographic Failures6High / Critical

Roadmap

First, eliminate blocking synchronous calls in TypeScript and JavaScript by adopting async APIs, and immediately resolve the six historical secret findings, starting with REDACTED. Next, address the single end-of-life runtime warning to ensure platform stability. Then, integrate a SAST step into CI using CodeQL or Semgrep to prevent security regressions from merging. Finally, implement a draft release or manual gate to ensure no bad build reaches users without a human checkpoint.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (6).+2.5 ptsLowSecrets (history)
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life.+2.1 ptsLowPlatform End-of-Life
Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5).+1.4 ptsLowDependency Vulnerabilities
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+1.3 ptsLowStatic Analysis (SAST)
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+1.3 ptsLowStatic Analysis (SAST)
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.3 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.3 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.3 ptsLowSupply-chain Provenance & Signing

File quality

Per-file score 0–10 — a quality signature. Of 344 files carrying findings, judged against the Production bar: 1% slop · 49% mixed · 50% near-clean.

FileScoreBandWorst signal
REDACTED0.7SlopDependency Vulnerabilities: High CVE: REDACTED
src/platform/graphics/webgl/webgl-graphics-device.js3.5SlopChange Coupling: Boundary-crossing change coupling: webgl-graphics-device.js ↔ quad-render-utils.js
src/platform/graphics/webgl/webgl-texture.js4.1MixedCyclomatic Complexity: WebglTexture.upload (cyclomatic 74)
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedSecrets (history): REDACTED: REDACTED
src/scene/gsplat-unified/gsplat-manager.js4.8MixedCyclomatic Complexity: GSplatManager.update (cyclomatic 16)
src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js4.8MixedCognitive Complexity: GSplatWorkBufferRenderPass.update (cognitive 38)
src/extras/gizmo/rotate-gizmo.js4.8MixedCognitive Complexity: RotateGizmo._drag (cognitive 19)
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
src/framework/components/element/text-element.js5.5MixedCyclomatic Complexity: TextElement._updateMeshes (cyclomatic 85)
src/extras/exporters/gltf-exporter.js5.5MixedCyclomatic Complexity: GltfExporter.writeStandardMaterial (cyclomatic 57)
src/framework/lightmapper/lightmapper.js5.5MixedCyclomatic Complexity: Lightmapper.bakeInternal (cyclomatic 33)
src/scene/gsplat-unified/gsplat-params.js5.5MixedCyclomatic Complexity: applySettings (cyclomatic 21)
src/extras/gizmo/translate-gizmo.js5.5MixedCognitive Complexity: _drag (cognitive 21)
src/framework/handlers/basis-worker.js5.5MixedCyclomatic Complexity: basis-worker.BasisWorker (cyclomatic 84)

How the grades work

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 — 48

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 — 983

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 — 56

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 32

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 47 of 51 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 51 dimensions across the health lenses
D1D2D3D4D6D8D9D10D12D13D14D15D16D17D19D21D26D28D29D30D34D35D36D43D44AX10AX3AX4M1M2M3M4P1P10P3P4P6PF3R1R10R2R3R4R5R6R7R8R9X24X25X29

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
  1. 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, 1072 of 1087 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a0f940-1fb5-729d-b8a1-04b30bb02b91.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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.

  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the mocha run in the repository root produced no per-test report (GET: /test/assets/someurl.glb - Error 404. Retrying in 2 ms). This is OUR limitation, not a defect in the repo — it is excluded from the score.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the mocha suite in the repository root was NOT MEASURED: the mocha run in the repository root produced no per-test report (GET: /test/assets/someurl.glb - Error 404. Retrying in 2 ms). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (package.json), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and none applies: this repository publishes a library and deploys nothing (no container, IaC or deployment manifest), so it holds no runtime state of its own. Any data-access dependency it declares is the store it is a CLIENT for, not one it operates. The DR control belongs to whoever runs that data.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 510 further occurrence(s) are not listed individually; the score already reflects all 550.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java and Rust source only, and no C# was loaded and no Java or Rust was found in this repository, 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.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala source only, and no C# was loaded and no Scala was found in this repository, 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.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala source only, and no C# was loaded and no Scala was found in this repository, 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.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (4): D19, D21, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.1 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.1 / 10 · rule-coverage 100% · ceiling Prevented

306 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was constructor at 89. A further 16 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. 10 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/platform/graphics/constants.js (getPixelFormatArrayType at 32), src/platform/graphics/constants.js (constants.getPixelFormatArrayType at 32), src/scene/gsplat/gsplat-sog-data.js (GSplatSogIterator.constructor at 24), src/platform/graphics/uniform-buffer-format.js (UniformFormat.constructor at 23), scripts/physics/vehicle.js (vehicle.VehicleControls.initialize at 21), and 5 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.

BasisWorker::transcodeBasis (cyclomatic 20) · ×2src/framework/handlers/basis-worker.js:295
update (cyclomatic 17) · ×2src/extras/mini-stats/mini-stats.js:722
constructor (cyclomatic 16) · ×2src/platform/graphics/transform-feedback.js:124
constructor (cyclomatic 89)src/platform/graphics/render-target.js:356
TextElement._updateMeshes (cyclomatic 85)src/framework/components/element/text-element.js:863

+ 176 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 2 BasisWorker finding(s) in Cyclomatic Complexity — start with basis-worker.js (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 2 update (cyclomatic 17) finding(s) in Cyclomatic Complexity — start with mini-stats.js, camera-frame.js. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 constructor (cyclomatic 16) finding(s) in Cyclomatic Complexity — start with transform-feedback.js, vertex-format.js. — One of this dimension's main actionable groups (2 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity3.3 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 3.3 / 10 · rule-coverage 100% · ceiling Prevented

564 method(s) exceeded the cognitive complexity threshold of 15; the worst was _updateMeshes at 221.

BasisWorker::transcodeBasis (cognitive 28) · ×3src/framework/handlers/basis-worker.js:295
_drag (cognitive 21) · ×2src/extras/gizmo/translate-gizmo.js:465
UnifiedSortWorker::computeEffectiveDistanceRangeLinear (cognitive 18) · ×2src/scene/gsplat-unified/gsplat-unified-sort-worker.js:179
_updateMeshes (cognitive 221)src/framework/components/element/text-element.js:863
WebglTexture.upload (cognitive 197)src/platform/graphics/webgl/webgl-texture.js:476

+ 338 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 3 BasisWorker finding(s) in Cognitive Complexity — start with basis-worker.js (3). — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 2 _drag (cognitive 21) finding(s) in Cognitive Complexity — start with translate-gizmo.js, scale-gizmo.js. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 UnifiedSortWorker finding(s) in Cognitive Complexity — start with gsplat-unified-sort-worker.js (2). — One of this dimension's main actionable groups (2 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes0.0 / 10Critical✓ 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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Prevented

123 god class(es) detected.

ClassTooLong: WebglGraphicsDevice · ×34src/platform/graphics/webgl/webgl-graphics-device.js:144
FileTooLong: webgl/webgl-graphics-device.js · ×33src/platform/graphics/webgl/webgl-graphics-device.js
TooManyMethods: WebglGraphicsDevice · ×25src/platform/graphics/webgl/webgl-graphics-device.js:144
MethodTooLong: TextElement._updateMeshes · ×23src/framework/components/element/text-element.js:863
FunctionTooLong: layout-calculator.createCalculator · ×8src/framework/components/layout-group/layout-calculator.js:57

What to do

  1. Resolve the 34 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 (34 warning-level).
  2. Resolve the 33 FileTooLong finding(s) in God Classes — start with component.js (3), webgl-graphics-device.js, text-element.js. — One of this dimension's main actionable groups (33 warning-level).
  3. Resolve the 25 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 (25 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication10.0 / 10Exemplary✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 duplicated block group(s) detected.

✓ On the Gold path — maintain.

Detailed fixes: d4_recommendation.md.

D6 · Cohesion (LCOM4)9.5 / 10Stronggated by 16 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Verified

16 of 403 classes have LCOM4 above 3.

Low cohesion: CollisionComponentSystem (LCOM4 10) · ×16src/framework/components/collision/system.js:600

What to do

  1. 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).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D8 · Code Coverage9.8 / 10Stronggated by 148 serious findings✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

Line coverage 75.7% — 148 file(s) below 50%. Measured from the JavaScript/TypeScript suite (mocha + c8 via `npm ci --ignore-scripts` in the repository root).

Low coverage: src/core/read-stream.js · ×148src/core/read-stream.js

What to do

  1. Resolve the 148 Low coverage finding(s) in Code Coverage — start with basis.js (2), read-stream.js, ref-counted-key-cache.js. — One of this dimension's main actionable groups (148 warning-level).
  2. Enforce Code Coverage in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

3557 test methods: 3557 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 3557 `it`/`test` case(s) across 265 test file(s) declaring at least one; its tier split is read from package names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Stronggated by 10 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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

24 skipped (24 with a documented reason), 10 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 3555 tests.

No assertions: fires a drag:end event when dragging ends via touchend and stops firing drag:move events · ×10test/framework/components/element/element-drag-helper.test.mjs:211
Skipped (documented): assets not in asset registry get loaded after they are added to the registry · ×24test/framework/i18n/i18n.test.mjs:592

What to do

  1. Resolve the 10 No assertions finding(s) in Test Quality — start with element-drag-helper.test.mjs (10). — One of this dimension's main actionable groups (10 warning-level).
  2. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

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: this dimension grades what SHIPS. Whether any of these packages is DEPRECATED or UNMAINTAINED is not graded — registry.npmjs.org's latest-version answer carries neither, and release age does not stand in for a maintenance status. 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.

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 2 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 2 production dependency(ies) this repository's committed lockfile resolves, across 1 product package.json manifest(s). Its 56 `devDependencies` declaration(s) are excluded: a consumer installs none of them. ★ DEPTH: this is the DIRECT production set the lockfile resolves, NOT the transitive closure — only one of the four lock dialects this pass reads states a full graph, so a banned licence pulled in only by a dependency's OWN dependencies is outside this verdict, exactly as the JVM arm's declaration-site verdict is. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. This repository publishes itself under MIT, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.6 / 10Stronggated by 47 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/platform/graphics/webgl/webgl-graphics-device.js (31×47=1457); src/scene/renderer/shadow-renderer.js (21×58=1218); src/platform/graphics/render-target.js (12×67=804) Repeated repair below the complexity floor: src/framework/parsers/sog.js (3 of 4 changes were fixes); examples/src/examples/gaussian-splatting/depth-of-field.example.mjs (3 of 3 changes were fixes)

Hotspot: src/platform/graphics/webgl/webgl-graphics-device.js · ×45src/platform/graphics/webgl/webgl-graphics-device.js:227
Repeated repair: src/framework/parsers/sog.js · ×2src/framework/parsers/sog.js:127

What to do

  1. Resolve the 45 Hotspot finding(s) in Churn × Complexity Hotspots — start with system.js (2), component.js (2), webgl-graphics-device.js. — One of this dimension's main actionable groups (45 warning-level).
  2. Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with sog.js, depth-of-field.example.mjs. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

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.

Maturity: Documented → Verified → Prevented · effective 6.7 / 10 · rule-coverage 100% · ceiling Documented

200 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 609 of the 1258 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 · ×2
Further sole-owners (lower concentration)

What to do

  1. Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
  2. 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.

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

The repository's root README and four subdirectory READMEs all serve their own directories: the top-level PlayCanvas Engine README describes itself as an open-source WebGL2/WebGPU engine with links to user docs, API, examples, a multilingual README, install, usage, and licensing; the examples/README documents local development of browser examples (npm dev, HTTPS dev) and one-time setup; test/README covers unit tests, WebGPU testing, coverage, and writing tests; scripts/esm/README describes ready-to-use scripts with what's included and resources; finally, examples/assets/wasm/README details precompiled WASM modules like ammo.js and zstd. All four subdirectories are well-structured per their scope.

Documentation: no project overview · ×2README.md

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 build units (npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)4.0 / 10Weak✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 4.0 / 10 · rule-coverage 100% · ceiling Documented

6 finding(s): 0 critical, 6 high, 0 medium, 0 low.

REDACTED

What to do

  1. Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)5.6 / 10Adequate✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 5.6 / 10 · rule-coverage 100% · ceiling Documented

36 finding(s): 0 critical, 35 high, 1 medium, 0 low. 32 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 4 file(s) — `examples/assets/scripts/utils/area-light-lut-bin-gen.js`, `examples/assets/wasm/ammo/ammo.wasm.js`, `examples/assets/wasm/draco/draco.js`, `REDACTED` — 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

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 32 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (32 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities6.5 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.5 / 10 · rule-coverage 100% · ceiling Documented

8 finding(s): 0 critical, 5 high, 2 medium, 1 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
  2. 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).
  3. Resolve the 1 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness9.9 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

5 of 609 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-mesh-detection.js. Counted over 609 of the 1258 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.5 / 10Adequategated by 2 critical findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: stdDeclaration.js↔stdDeclaration.js 90%; vec2.js↔vec4.js 89%; vec3.js↔vec4.js 83%

Boundary-crossing change coupling: webgl-graphics-device.js ↔ quad-render-utils.js · ×2src/platform/graphics/webgl/webgl-graphics-device.js
Change coupling: stdDeclaration.js ↔ stdDeclaration.js · ×20src/scene/shader-lib/glsl/chunks/standard/frag/stdDeclaration.js
Change-coupling hub: gsplat-manager.js → compute-radix-sort-multipass.js, gsplat-info.js, gsplat-interval-compaction.js, gsplat-octree-instance.js, gsplat-projector.js, gsplat-unified-sort-worker.js, gsplat-work-buffer.js · ×4src/scene/gsplat-unified/gsplat-manager.js
Change coupling clique: vec2.js, vec3.js, vec4.jssrc/core/math/vec2.js

What to do

  1. Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with webgl-graphics-device.js, deprecated.js. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 20 Change coupling finding(s) in Change Coupling — start with gsplat-work-buffer-render-pass.js (2), gsplat-params.js (2), stdDeclaration.js. — One of this dimension's main actionable groups (20 warning-level).
  3. Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with gsplat-manager.js, gsplatCommon.js, standard-material-options-builder.js. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Documented

1/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. 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.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life6.0 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

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

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life. — 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.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition9.9 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

M1 · Documentation (README)7.7 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 1 of 2 project(s) that lack one — worth up to 1 pts.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

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 23202 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.

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.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `takeThumbnails` is async and calls readFileSync, unlinkSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — examples/utils/thumbnails.mjs:144
  • `takeScreenshots` is async and calls rmSync, existsSync, mkdirSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — examples/utils/thumbnails.mjs:201

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.
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.

R10 · Code Duplication9.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • 67 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 45 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 67 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 67 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 67 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/framework/components/gsplat/component.js:423
  • 64 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) — 49 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 64 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 64 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 64 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
  • 34 duplicated blocks under the repository root have copies in at least two of the sibling directories scripts, src — 14 of them are reported below, and 20 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 34 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 34 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 34 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
  • 18 duplicated blocks under src/scene/ have copies in at least two of the sibling directories composition, geometry, graphics, gsplat, gsplat-unified, lighting (+5 more sibling(s) not listed) — 9 of them are reported below, and 9 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 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 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 18 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:936
  • 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:46
  • 6 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 2 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 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 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 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/platform/graphics/webgl/webgl-xr-bridge.js:265
  • src/extras/gizmo/scale-gizmo.js:17 · src/extras/gizmo/translate-gizmo.js:17 — the two spans are one implementation copied and then locally edited — 2012 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/scale-gizmo.js:17
  • src/framework/components/model/component.js:158 · src/framework/components/render/component.js:196 — the two spans are one implementation copied and then locally edited — 1528 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 — 164 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — src/scene/shader-lib/glsl/collections/shader-chunks-glsl.js:1
  • src/core/math/vec3.js:108 · src/core/math/vec4.js:111 — the two spans are one implementation copied and then locally edited — 1178 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/core/math/vec3.js:108
  • scripts/esm/gsplat/gsplat-image.mjs:32 · scripts/esm/gsplat/gsplat-text.mjs:74 — the two spans are one implementation copied and then locally edited — 779 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/esm/gsplat/gsplat-image.mjs:32
  • src/extras/gizmo/shape/arrow-shape.js:13 · src/extras/gizmo/shape/boxline-shape.js:13 — 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:13
  • src/platform/graphics/webgl/webgl-texture.js:535 · src/platform/graphics/webgl/webgl-texture.js:724 — 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:535
  • src/framework/parsers/sog-bundle.js:141 · src/framework/parsers/sog.js:81 — the two spans are one implementation copied and then locally edited — 531 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/framework/parsers/sog-bundle.js:141
  • src/scene/gsplat-unified/gsplat-hybrid-renderer.js:118 · src/scene/gsplat-unified/gsplat-quad-renderer.js:32 — the two spans are one implementation copied and then locally edited — 383 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/scene/gsplat-unified/gsplat-hybrid-renderer.js:118
  • src/scene/light.js:492 · src/scene/light.js:711 — 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:492
  • src/framework/components/button/system.js:23 · src/framework/components/scroll-view/system.js:27 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/framework/components/button/system.js:23
  • src/extras/input/sources/dual-gesture-source.js:165 · src/extras/input/sources/single-gesture-source.js:126 — the two spans are one implementation copied and then locally edited — 395 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extras/input/sources/dual-gesture-source.js:165
  • src/framework/components/rigid-body/component.js:205 · src/framework/components/rigid-body/component.js:403 — the two spans are one implementation copied and then locally edited — 283 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/framework/components/rigid-body/component.js:205
  • src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:453 · src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:576 — the two spans are one implementation copied and then locally edited — 480 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:453
  • 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
  • scripts/posteffects/posteffect-brightnesscontrast.js:37 · scripts/posteffects/posteffect-huesaturation.js:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/posteffects/posteffect-brightnesscontrast.js:37
  • src/core/math/quat.js:36 · src/core/math/vec4.js:25 — the two spans are one implementation copied and then locally edited — 347 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/core/math/quat.js:36
  • src/platform/graphics/index-buffer.js:98 · src/platform/graphics/vertex-buffer.js:102 — 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
  • REDACTED:523 · REDACTED:1106 — the two spans are one implementation copied and then locally edited — 423 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. — REDACTED:523
  • src/scene/gsplat-unified/gsplat-interval-compaction.js:150 · src/scene/gsplat-unified/gsplat-projector.js:237 — the two spans are one implementation copied and then locally edited — 267 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:150
  • src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:20 · src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:20 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:20
  • scripts/posteffects/posteffect-horizontaltiltshift.js:42 · scripts/posteffects/posteffect-verticaltiltshift.js:42 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/posteffects/posteffect-horizontaltiltshift.js:42
  • src/scene/shader-lib/glsl/collections/particle-chunks-glsl.js:43 · src/scene/shader-lib/wgsl/collections/particle-chunks-wgsl.js:43 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/scene/shader-lib/glsl/collections/particle-chunks-glsl.js:43
  • scripts/posteffects/posteffect-blend.js:46 · scripts/posteffects/posteffect-outline.js:74 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/posteffects/posteffect-blend.js:46
  • src/framework/components/model/system.js:32 · src/framework/components/render/system.js:33 — 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
  • REDACTED:6444 · REDACTED:6512 — all 2 copies are in the same file, 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. — REDACTED:6444
  • src/extras/render-passes/frame-pass-volumetric-fog.js:199 · src/extras/render-passes/frame-pass-volumetric-fog.js:495 — the two spans are one implementation copied and then locally edited — 355 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/extras/render-passes/frame-pass-volumetric-fog.js:199
  • src/framework/handlers/basis-worker.js:218 · src/framework/handlers/basis-worker.js:316 — the two spans are one implementation copied and then locally edited — 252 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/handlers/basis-worker.js:218
  • src/framework/xr/xr-mesh-detection.js:28 · src/framework/xr/xr-plane-detection.js:28 — the two spans are one implementation copied and then locally edited — 239 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/framework/xr/xr-mesh-detection.js:28
  • src/extras/input/sources/dual-gesture-source.js:88 · src/extras/input/sources/single-gesture-source.js:54 — the two spans are one implementation copied and then locally edited — 239 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extras/input/sources/dual-gesture-source.js:88
  • 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
  • src/framework/anim/controller/anim-blend-tree-2d-cartesian.js:17 · src/framework/anim/controller/anim-blend-tree-2d-directional.js:16 — the two spans are one implementation copied and then locally edited — 331 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/anim/controller/anim-blend-tree-2d-cartesian.js:17
  • src/platform/graphics/webgl/webgl-graphics-device.js:501 · src/platform/graphics/webgl/webgl-graphics-device.js:610 — all 2 copies are in the same file, 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/webgl/webgl-graphics-device.js:501

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.
R2 · Cyclomatic Complexity6.0 / 10Adequate✓ Tool-verified

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.

  • initializeComponentData has cyclomatic complexity 84 and cognitive complexity 128; 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:105
  • _updateMeshes has cyclomatic complexity 79 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/framework/components/element/text-element.js:863
  • initialize has cyclomatic complexity 76 and cognitive complexity 4; 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/webgl/webgl-texture.js:109
  • upload has cyclomatic complexity 74 and cognitive complexity 197; 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:476
  • readAnimation has cyclomatic complexity 73 and cognitive complexity 244; 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:5628
  • constructor has cyclomatic complexity 69 and cognitive complexity 80; 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:356
  • readAnimation has cyclomatic complexity 67 and cognitive complexity 207; 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:4306
  • readSkeletonData has cyclomatic complexity 61 and cognitive complexity 163; 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:5279
  • _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:375
  • writeStandardMaterial has cyclomatic complexity 57 and cognitive complexity 79; 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:410
  • 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:292
  • (anonymous) has cyclomatic complexity 50 and cognitive complexity 47; 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. — REDACTED:3
  • apply has cyclomatic complexity 46 and cognitive complexity 131; 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:733
  • _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. — src/core/preprocessor.js: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
  • _validateCopy has cyclomatic complexity 45 and cognitive complexity 30; 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:1482
  • validate has cyclomatic complexity 43 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/scene/materials/standard-material-validator.js:72
  • constructor has cyclomatic complexity 43 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/platform/graphics/texture.js:294
  • frameUpdate has cyclomatic complexity 42 and cognitive complexity 86; 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/render-passes/render-pass-compose.js:378

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files6.1 / 10Adequate✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • 131 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: src/platform/graphics/webgl/webgl-graphics-device.js (2795), src/framework/components/element/component.js (2584), src/scene/materials/standard-material.js (2204), src/platform/graphics/constants.js (2165), src/framework/components/particle-system/component.js (2096), src/framework/components/element/text-element.js (1986) (+125 more).

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage9.9 / 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. (×12) — utils/esbuild-build-target.mjs, build.mjs, utils/plugins/rollup-types-fixup.mjs, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness8.9 / 10Strong✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
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.

R7 · Dead Code9.2 / 10Exemplary✓ 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 117 application, 7 tooling and 296 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 (117 application, 7 tooling, 296 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 — src/scene/shader-lib/glsl/chunks/lit/vert/viewNormal.js
  • Nothing imports this binding — it is safe to review for removal. (×16) — src/extras/gizmo/color.js:6, 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, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

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.

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

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.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

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.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element6.8 / 10Adequate✓ Tool-verified

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.

  • This loop runs once per element of `timelineMode`, and the statement it guards acts on the element it is on — `timelineMode[i]`. The test deciding whether that statement runs does not: `to == null || timeline instanceof spine.AttachmentTimeline || timeline instan...` reads `timelineMode[ii]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts — the fixed one at line 1418, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out. — REDACTED:1808

What to do

  • Each finding names the test and the statement it guards, which index the same collection at two different subscripts — one fixed, one the loop variable. Confirm from the two, then decide which subscript the test meant. If it was meant to be per-element, give it the loop variable so each element is judged on itself. If it really is one answer for the whole collection, hoist the test OUT of the loop, where a reader can see it is asked once and where it is not re-evaluated on every pass — leaving it inside, reading a fixed element, is the one arrangement that cannot be right under either reading.

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.

LensScoreRatingImpact
Code Health68%Adequate — gated by D2, D3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture88%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity66%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness64%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security58%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateStrongest area.
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 — 1 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 — 4 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.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 75 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — 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
  • 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), 1261 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 1250 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, 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.
  • X1 Async correctness — 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
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — 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
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — not 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
  • X28 Index access outside its own emptiness guard — 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
  • X3 Exception handling — 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
  • X30 Support guard that admits what it rejects — 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
  • 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
  • X5 Nullable reference types — 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.

Critical — 48 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 7 more in this group — see findings.md.
D28 · Secrets (history) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×2
  • Boundary-crossing change coupling: webgl-graphics-device.js ↔ quad-render-utils.js src/platform/graphics/webgl/webgl-graphics-device.js — `src/platform/graphics/webgl/webgl-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 50% of the time (8 of the 16 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 8 shared commits counted here, the most recent 3 are `1e0b1976` [BREAKING] Remove no longer needed drawTexture (#6886); `325ece1a` Updated the way WebGPU submits command buffers for rendering (#5423); `88d2f92d` StencilParameters support on WebGPU (#5243) — run `git show` on any of them.
  • Boundary-crossing change coupling: deprecated.js ↔ blend-state.js src/deprecated/deprecated.js — `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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 983 finding(s)
D8 · Code Coverage · Low coverage · ×148
  • Low coverage: src/core/read-stream.js src/core/read-stream.js — 4.6% line coverage (8/174).
  • Low coverage: src/core/ref-counted-key-cache.js src/core/ref-counted-key-cache.js — 15.3% line coverage (15/98).
  • Low coverage: src/core/tags-cache.js src/core/tags-cache.js — 32.9% line coverage (53/161).
  • Low coverage: src/core/shape/tri.js src/core/shape/tri.js — 22.2% line coverage (34/153).
  • Low coverage: src/extras/exporters/core-exporter.js src/extras/exporters/core-exporter.js — 26.3% line coverage (44/167).
  • Low coverage: src/extras/exporters/gltf-exporter.js src/extras/exporters/gltf-exporter.js — 24.0% line coverage (279/1162).
  • Low coverage: src/extras/gizmo/gizmo.js src/extras/gizmo/gizmo.js — 7.6% line coverage (58/762).
  • Low coverage: src/extras/gizmo/mesh-line.js src/extras/gizmo/mesh-line.js — 22.2% line coverage (22/99).
  • Low coverage: src/extras/gizmo/rotate-gizmo.js src/extras/gizmo/rotate-gizmo.js — 8.7% line coverage (70/805).
  • Low coverage: src/extras/gizmo/scale-gizmo.js src/extras/gizmo/scale-gizmo.js — 10.3% line coverage (62/600).
  • Low coverage: src/extras/gizmo/transform-gizmo.js src/extras/gizmo/transform-gizmo.js — 7.9% line coverage (63/800).
  • Low coverage: src/extras/gizmo/translate-gizmo.js src/extras/gizmo/translate-gizmo.js — 10.5% line coverage (63/601).
  • Low coverage: src/extras/gizmo/tri-data.js src/extras/gizmo/tri-data.js — 20.0% line coverage (18/90).
  • Low coverage: src/extras/gizmo/view-cube.js src/extras/gizmo/view-cube.js — 3.5% line coverage (15/430).
  • Low coverage: src/extras/gizmo/shape/arc-shape.js src/extras/gizmo/shape/arc-shape.js — 10.1% line coverage (22/218).
  • Low coverage: src/extras/gizmo/shape/arrow-shape.js src/extras/gizmo/shape/arrow-shape.js — 11.4% line coverage (30/264).
  • Low coverage: src/extras/gizmo/shape/box-shape.js src/extras/gizmo/shape/box-shape.js — 21.5% line coverage (17/79).
  • Low coverage: src/extras/gizmo/shape/boxline-shape.js src/extras/gizmo/shape/boxline-shape.js — 10.7% line coverage (29/272).
  • Low coverage: src/extras/gizmo/shape/plane-shape.js src/extras/gizmo/shape/plane-shape.js — 14.0% line coverage (22/157).
  • Low coverage: src/extras/gizmo/shape/shape.js src/extras/gizmo/shape/shape.js — 13.2% line coverage (42/318).
  • Low coverage: src/extras/gizmo/shape/sphere-shape.js src/extras/gizmo/shape/sphere-shape.js — 20.5% line coverage (17/83).
  • Low coverage: src/extras/input/input.js src/extras/input/input.js — 29.9% line coverage (89/298).
  • Low coverage: src/extras/input/pose.js src/extras/input/pose.js — 9.5% line coverage (20/210).
  • Low coverage: src/extras/input/utils.js src/extras/input/utils.js — 20.0% line coverage (5/25).
  • Low coverage: src/extras/input/controllers/fly-controller.js src/extras/input/controllers/fly-controller.js — 25.0% line coverage (29/116).
  • + 123 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×45
  • Hotspot: src/platform/graphics/webgl/webgl-graphics-device.js src/platform/graphics/webgl/webgl-graphics-device.js:227 — src/platform/graphics/webgl/webgl-graphics-device.js changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in WebglGraphicsDevice.constructor at line 227. 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-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/shadow-renderer.js src/scene/renderer/shadow-renderer.js:292 — src/scene/renderer/shadow-renderer.js changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in ShadowRenderer.cullShadowCastersOmni at line 292. 5 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/render-target.js src/platform/graphics/render-target.js:356 — src/platform/graphics/render-target.js changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in RenderTarget.constructor at line 356. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/platform/graphics/render-target.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/framework/components/element/text-element.js src/framework/components/element/text-element.js:863 — 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 85 in TextElement._updateMeshes at line 863. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/webgpu/webgpu-graphics-device.js src/platform/graphics/webgpu/webgpu-graphics-device.js:1339 — src/platform/graphics/webgpu/webgpu-graphics-device.js changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in WebgpuGraphicsDevice.draw at line 1339. 9 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-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/scene/renderer/forward-renderer.js src/scene/renderer/forward-renderer.js:281 — src/scene/renderer/forward-renderer.js changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in ForwardRenderer.renderForwardInternal at line 281. 2 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-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/framework/app-base.js src/framework/app-base.js:567 — src/framework/app-base.js changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AppBase.init at line 567. 2 of those changes were fix/bug commits, and the other 28 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/framework/components/element/system.js src/framework/components/element/system.js:105 — src/framework/components/element/system.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in ElementComponentSystem.initializeComponentData at line 105. 1 of those changes was a fix/bug commit, 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-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/framework/components/element/system.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/platform/graphics/graphics-device.js src/platform/graphics/graphics-device.js:840 — src/platform/graphics/graphics-device.js changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in GraphicsDevice.initCapsDefines at line 840. 2 of those changes were fix/bug commits, and the other 23 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/platform/graphics/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/renderer.js src/scene/renderer/renderer.js:468 — src/scene/renderer/renderer.js changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in Renderer.setCameraUniforms at line 468. 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-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/scene/renderer/renderer.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/scene/shader-lib/programs/standard.js src/scene/shader-lib/programs/standard.js:355 — src/scene/shader-lib/programs/standard.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in ShaderGeneratorStandard.createShaderDefinition at line 355. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/scene/mesh-instance.js src/scene/mesh-instance.js:1749 — src/scene/mesh-instance.js changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in MeshInstance.getMaterialBindGroup at line 1749. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/platform/graphics/texture.js src/platform/graphics/texture.js:1257 — src/platform/graphics/texture.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in Texture.setSource at line 1257. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/extras/mini-stats/mini-stats.js src/extras/mini-stats/mini-stats.js:770 — src/extras/mini-stats/mini-stats.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in MiniStats.rebuildGeometry at line 770. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/materials/standard-material-options-builder.js src/scene/materials/standard-material-options-builder.js:145 — src/scene/materials/standard-material-options-builder.js changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in StandardMaterialOptionsBuilder._updateTexOptions at line 145. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/gsplat-unified/gsplat-world.js src/scene/gsplat-unified/gsplat-world.js:462 — src/scene/gsplat-unified/gsplat-world.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in GSplatWorld.update at line 462. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/components/collision/system.js src/framework/components/collision/system.js:329 — src/framework/components/collision/system.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in system.recreateShapes at line 329. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/framework/components/collision/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/batching/batch-manager.js src/scene/batching/batch-manager.js:677 — 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 677. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in AssetRegistry.load at line 462. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/extras/render-passes/frame-pass-camera-frame.js src/extras/render-passes/frame-pass-camera-frame.js:442 — src/extras/render-passes/frame-pass-camera-frame.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in FramePassCameraFrame.needsReset at line 442. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/extras/render-passes/frame-pass-camera-frame.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/framework/lightmapper/lightmapper.js src/framework/lightmapper/lightmapper.js:932 — src/framework/lightmapper/lightmapper.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Lightmapper.bakeInternal at line 932. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01: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/framework/components/script/component.js src/framework/components/script/component.js:769 — src/framework/components/script/component.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in ScriptComponent.create at line 769. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/framework/components/script/component.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-director.js src/scene/gsplat-unified/gsplat-director.js:349 — src/scene/gsplat-unified/gsplat-director.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in GSplatDirector.update at line 349. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-director.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/scene/gsplat-unified/gsplat-octree-instance.js src/scene/gsplat-unified/gsplat-octree-instance.js:634 — src/scene/gsplat-unified/gsplat-octree-instance.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in GSplatOctreeInstance.applyLodChanges at line 634. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-octree-instance.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/scene/gsplat-unified/gsplat-budget-balancer.js src/scene/gsplat-unified/gsplat-budget-balancer.js:85 — src/scene/gsplat-unified/gsplat-budget-balancer.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in GSplatBudgetBalancer.balance at line 85. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/scene/gsplat-unified/gsplat-budget-balancer.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.
  • + 20 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×34
  • ClassTooLong: WebglGraphicsDevice src/platform/graphics/webgl/webgl-graphics-device.js:144 — ClassTooLong — 1576 significant lines (blank, comment-only and punctuation-only lines excluded), 86 methods. The bar is 400 significant lines; this is 1176 over it, 3.94× 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 — 1325 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 925 over it, 3.31× 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 — 1043 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 643 over it, 2.61× 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:68 — ClassTooLong — 940 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 540 over it, 2.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ParticleSystemComponent src/framework/components/particle-system/component.js:137 — ClassTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 345 over it, 1.86× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WebglTexture src/platform/graphics/webgl/webgl-texture.js:62 — ClassTooLong — 654 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 254 over it, 1.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppBase src/framework/app-base.js:130 — ClassTooLong — 649 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 249 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: 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 — 646 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 246 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:138 — ClassTooLong — 602 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 202 over it, 1.51× 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: Lightmapper src/framework/lightmapper/lightmapper.js:66 — ClassTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded), 29 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: XrMenu scripts/esm/xr/xr-menu.mjs:88 — ClassTooLong — 556 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 156 over it, 1.39× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Renderer src/scene/renderer/renderer.js:156 — ClassTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 155 over it, 1.39× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GltfExporter src/extras/exporters/gltf-exporter.js:145 — ClassTooLong — 550 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 150 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: GraphicsDevice src/platform/graphics/graphics-device.js:58 — ClassTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 135 over it, 1.34× 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:285 — ClassTooLong — 533 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 133 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: Camera src/scene/camera.js:47 — ClassTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 127 over it, 1.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Texture src/platform/graphics/texture.js:70 — ClassTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 118 over it, 1.30× 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 — 518 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 118 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ModelComponent src/framework/components/model/component.js:54 — ClassTooLong — 480 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 80 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ElementInput src/framework/input/element-input.js:356 — ClassTooLong — 475 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 75 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GraphNode src/scene/graph-node.js:122 — ClassTooLong — 470 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 70 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BatchManager src/scene/batching/batch-manager.js:66 — ClassTooLong — 460 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 60 over it, 1.15× 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.
  • + 9 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×33
  • FileTooLong: webgl/webgl-graphics-device.js src/platform/graphics/webgl/webgl-graphics-device.js — FileTooLong — 1667 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 95% of them inside a single declaration: WebglGraphicsDevice (144-3264). The bar is 1500 significant lines; this is 167 over it, 1.11× 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 — 1425 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: TextElement (154-2365). The bar is 500 significant lines; this is 925 over it, 2.85× 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 — 1105 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 605 over it, 2.21× 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 — 1068 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ElementComponent (100-3006). The bar is 500 significant lines; this is 568 over it, 2.14× 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 — 989 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: WebgpuGraphicsDevice (68-2212). The bar is 500 significant lines; this is 489 over it, 1.98× 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 — 807 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-1166). The bar is 500 significant lines; this is 307 over it, 1.61× 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 — 795 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 295 over it, 1.59× 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: esm/water.mjs scripts/esm/water.mjs — FileTooLong — 758 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 258 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: particle-system/component.js src/framework/components/particle-system/component.js — FileTooLong — 757 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ParticleSystemComponent (137-2401). The bar is 500 significant lines; this is 257 over it, 1.51× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: framework/app-base.js src/framework/app-base.js — FileTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: AppBase (130-2120). The bar is 500 significant lines; this is 202 over it, 1.40× 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 — 688 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: WebglTexture (62-909). The bar is 500 significant lines; this is 188 over it, 1.38× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: graphics/constants.js src/platform/graphics/constants.js — FileTooLong — 676 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 176 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scene/light.js src/scene/light.js — FileTooLong — 668 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: Light (138-1265). 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: exporters/gltf-exporter.js src/extras/exporters/gltf-exporter.js — FileTooLong — 657 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 (145-1160). The bar is 500 significant lines; this is 157 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: webgpu/webgpu-shader-processor-wgsl.js src/platform/graphics/webgpu/webgpu-shader-processor-wgsl.js — FileTooLong — 650 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 61% of them inside a single declaration: WebgpuShaderProcessorWGSL (474-1343). The bar is 500 significant lines; this is 150 over it, 1.30× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: math/mat4.js src/core/math/mat4.js — FileTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Mat4 (48-1343). The bar is 500 significant lines; this is 145 over it, 1.29× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: renderer/renderer.js src/scene/renderer/renderer.js — FileTooLong — 641 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: Renderer (156-1442). The bar is 500 significant lines; this is 141 over it, 1.28× 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 — 620 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: Lightmapper (66-1165). The bar is 500 significant lines; this is 120 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/mesh-instance.js src/scene/mesh-instance.js — FileTooLong — 601 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: MeshInstance (285-1892). The bar is 500 significant lines; this is 101 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: input/element-input.js src/framework/input/element-input.js — FileTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 79% of them inside a single declaration: ElementInput (356-1219). The bar is 500 significant lines; this is 98 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: renderers/wide-line-renderer.js src/extras/renderers/wide-line-renderer.js — FileTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 97 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scroll-view/component.js src/framework/components/scroll-view/component.js — FileTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ScrollViewComponent (59-1366). The bar is 500 significant lines; this is 82 over it, 1.16× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: graphics/graphics-device.js src/platform/graphics/graphics-device.js — FileTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: GraphicsDevice (58-1979). The bar is 500 significant lines; this is 71 over it, 1.14× 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: gsplat-unified/gsplat-world.js src/scene/gsplat-unified/gsplat-world.js — FileTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ALLOCATOR_GROW_MULTIPLIER (56-1322). The bar is 500 significant lines; this is 70 over it, 1.14× 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.
  • + 8 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×25
  • TooManyMethods: WebglGraphicsDevice src/platform/graphics/webgl/webgl-graphics-device.js:144 — TooManyMethods — 86 methods. The bar is 30 methods; this is 56 over it, 2.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.
  • TooManyMethods: WebgpuGraphicsDevice src/platform/graphics/webgpu/webgpu-graphics-device.js:68 — TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ScrollViewComponent src/framework/components/scroll-view/component.js:59 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GraphNode src/scene/graph-node.js:122 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GraphicsDevice src/platform/graphics/graphics-device.js:58 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AppBase src/framework/app-base.js:130 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ButtonComponent src/framework/components/button/component.js:82 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ParticleSystemComponent src/framework/components/particle-system/component.js:137 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ImageElement src/framework/components/element/image-element.js:280 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ElementComponent src/framework/components/element/component.js:100 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Vec2 src/core/math/vec2.js:29 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: XrMenu scripts/esm/xr/xr-menu.mjs:88 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TextElement src/framework/components/element/text-element.js:154 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Renderer src/scene/renderer/renderer.js:156 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Vec3 src/core/math/vec3.js:34 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NullGraphicsDevice src/platform/graphics/null/null-graphics-device.js:18 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Mat4 src/core/math/mat4.js:48 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnimComponent src/framework/components/anim/component.js:54 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ModelComponent src/framework/components/model/component.js:54 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ElementInput src/framework/input/element-input.js:356 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Vec4 src/core/math/vec4.js:25 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Material src/scene/materials/material.js:108 — 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: MeshInstance src/scene/mesh-instance.js:285 — 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:61 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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: LayerComposition src/scene/composition/layer-composition.js:41 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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.
D3 · God Classes · MethodTooLong · ×23
  • MethodTooLong: TextElement._updateMeshes src/framework/components/element/text-element.js:863 — MethodTooLong — _updateMeshes runs 385 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 285 over it, 3.85× 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:227 — MethodTooLong — constructor runs 349 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 249 over it, 3.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WebglTexture.initialize src/platform/graphics/webgl/webgl-texture.js:109 — 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:476 — MethodTooLong — upload runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× 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:375 — MethodTooLong — _updateText runs 233 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ParticleCPUUpdater.update src/scene/particle-system/cpu-updater.js:98 — MethodTooLong — update runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SSAOEffect.constructor scripts/posteffects/posteffect-ssao.js:15 — MethodTooLong — constructor runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ConeBaseGeometry.constructor src/scene/geometry/cone-base-geometry.js:14 — MethodTooLong — constructor runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Preprocessor._preprocess src/core/preprocessor.js: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: RenderTarget.constructor src/platform/graphics/render-target.js:356 — MethodTooLong — constructor 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:677 — 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:448 — 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:105 — MethodTooLong — initializeComponentData runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WebglGraphicsDevice.draw src/platform/graphics/webgl/webgl-graphics-device.js:2148 — MethodTooLong — draw 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: Lightmapper.bakeInternal src/framework/lightmapper/lightmapper.js:932 — MethodTooLong — bakeInternal 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: 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: GSplatWeather.initialize scripts/esm/gsplat/gsplat-weather.mjs:173 — MethodTooLong — initialize runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SogBundleParser.load src/framework/parsers/sog-bundle.js:188 — MethodTooLong — load runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DdsParser.open src/framework/parsers/texture/dds.js:29 — MethodTooLong — open runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GSplatProjector.dispatch src/scene/gsplat-unified/gsplat-projector.js:646 — MethodTooLong — dispatch 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: GltfExporter.writeStandardMaterial src/extras/exporters/gltf-exporter.js:410 — MethodTooLong — writeStandardMaterial runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WorldClustersDebug.render src/scene/lighting/world-clusters-debug.js:54 — MethodTooLong — render runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CameraFrame.postUpdate scripts/esm/camera-frame.mjs:802 — MethodTooLong — postUpdate runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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.
D35 · Change Coupling · Change coupling · ×20
  • Change coupling: stdDeclaration.js ↔ stdDeclaration.js src/scene/shader-lib/glsl/chunks/standard/frag/stdDeclaration.js — `src/scene/shader-lib/glsl/chunks/standard/frag/stdDeclaration.js` and `src/scene/shader-lib/wgsl/chunks/standard/frag/stdDeclaration.js` change together 90% of the time (9 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 9 shared commits counted here, the most recent 3 are `7cacabe3` perf: Pass the model scale to dynamic refraction from the vertex shad…; `61d79c09` fix: Tint the ambient lighting by a lit argument set by the front end…; `0cd26847` Give a mesh instance lightmap its own texture slot (#9415) — run `git show` on any of them.
  • Change coupling: constants.js ↔ tracing.js src/core/constants.js — `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 — `src/platform/graphics/index-buffer.js` and `src/platform/graphics/vertex-buffer.js` change together 78% of the time (18 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `f8c6b8cd` Add partial vertex and index buffer uploads (#9401); `2b743a65` fix: Register StorageBuffer for WebGPU device lose/restore (#8692); `470e3280` Use Set instead of array for buffer tracking (#8283) — run `git show` on any of them.
  • Change coupling: particle_cpu.js ↔ particle_init.js src/scene/shader-lib/glsl/chunks/particle/vert/particle_cpu.js — `src/scene/shader-lib/glsl/chunks/particle/vert/particle_cpu.js` and `src/scene/shader-lib/glsl/chunks/particle/vert/particle_init.js` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `b8f6e42d` [Fix] Small changes to avoid unset uniform warnings when particle sys…; `53ecda04` Small changes to get CPU particles to work on WebGPU (#6277) (at that commit the files were still `src/scene/shader-lib/chunks/particle/vert/particle_cpu.js` and `src/scene/shader-lib/chunks/particle/vert/particle_init.js`); `453eea9d` fx texture sampling precision to highp (#2198) (at that commit the files were still `src/graphics/program-lib/chunks/particle_cpu.vert` and `src/graphics/program-lib/chunks/particle_init.vert`) — run `git show` on any of them.
  • Change coupling: skybox.js ↔ sky-mesh.js src/scene/shader-lib/glsl/chunks/skybox/frag/skybox.js — `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: webgpu-bind-group-format.js ↔ webgpu-bind-group.js src/platform/graphics/webgpu/webgpu-bind-group-format.js — `src/platform/graphics/webgpu/webgpu-bind-group-format.js` and `src/platform/graphics/webgpu/webgpu-bind-group.js` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 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: gsplat-work-buffer-render-pass.js ↔ gsplatCopyToWorkbuffer.js src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js — `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: shadow-renderer-directional.js ↔ shadow-renderer-local.js src/scene/renderer/shadow-renderer-directional.js — `src/scene/renderer/shadow-renderer-directional.js` and `src/scene/renderer/shadow-renderer-local.js` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 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: blend-state.js ↔ webgpu-graphics-device.js src/platform/graphics/blend-state.js — `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: gsplat-work-buffer-render-pass.js ↔ gsplatCopyToWorkbuffer.js src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js — `src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js` and `src/scene/shader-lib/wgsl/chunks/gsplat/frag/gsplatCopyToWorkbuffer.js` change together 59% of the time (13 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 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: gsplat-info.js ↔ gsplat-unified-sort-worker.js src/scene/gsplat-unified/gsplat-info.js — `src/scene/gsplat-unified/gsplat-info.js` and `src/scene/gsplat-unified/gsplat-unified-sort-worker.js` change together 58% of the time (7 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 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: anim-state.js ↔ component.js src/framework/anim/controller/anim-state.js — `src/framework/anim/controller/anim-state.js` and `src/framework/components/anim/component.js` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `cfbeda96` Tweaks to Anim API docs (#7520); `d2418b92` [Anim Component] Fix for resetting parameters (#5392); `a82e7f1f` [Anim Component] Support empty AnimTracks (#5112) — run `git show` on any of them.
  • Change coupling: gsplat.js ↔ gsplatCommon.js src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplat.js — `src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplat.js` and `src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplatCommon.js` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `e232ddf2` feat: Respect gsplat alphaCull on CPU raster and compute paths (#8687); `d5963f25` Remove deprecated gsplatCustomizeVS shader chunk (#8422); `fd561dd4` Add gsplatModifyVS shader customization chunk for gaussian splats (#8… — run `git show` on any of them.
  • Change coupling: gsplat-params.js ↔ gsplat-placement.js src/scene/gsplat-unified/gsplat-params.js — `src/scene/gsplat-unified/gsplat-params.js` and `src/scene/gsplat-unified/gsplat-placement.js` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `72626a18` Make gsplat LOD distance-only, with target or limit splat budgets (#9…; `a939ca99` Add a LOD mode and a per-splat detail falloff for streamed GSplats (#…; `c67179f0` refactor(gsplat)!: move lodRangeMin/lodRangeMax to GSplatComponent (#… — run `git show` on any of them.
  • Change coupling: sog-bundle.js ↔ sog.js src/framework/parsers/sog-bundle.js — `src/framework/parsers/sog-bundle.js` and `src/framework/parsers/sog.js` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `2ffa84bf` Recover SOG streaming across WebGL context loss (#9350); `ddfd9bbd` Fix SOG parsers throwing when a load completes after app teardown (#9…; `6e221b3d` Fix sog streaming re-load returning destroyed textures from loader ca… — run `git show` on any of them.
  • Change coupling: gles3.js ↔ webgpu.js src/platform/graphics/shader-chunks/frag/gles3.js — `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: standard-material.js ↔ lit-shader-options.js src/scene/materials/standard-material.js — `src/scene/materials/standard-material.js` and `src/scene/shader-lib/programs/lit-shader-options.js` change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `b902fb9d` docs: Rewrite the material class overviews (#9424); `c43c09ff` Publish the scene environment textures under their own uniforms (#9364); `7ca74274` [BREAKING] Use linear space for vertex colors in gLTF (#8122) — run `git show` on any of them.
  • Change coupling: lights-buffer.js ↔ clusteredLight.js src/scene/lighting/lights-buffer.js — `src/scene/lighting/lights-buffer.js` and `src/scene/shader-lib/glsl/chunks/lit/frag/clusteredLight.js` change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `0f4c6037` Fix spotlight rendering issues with small cone angles in clustered li…; `1a58b59d` [Fix] Fixed issue where clustered light color is over half-float rang… (at that commit the file was still `src/scene/shader-lib/chunks/lit/frag/clusteredLight.js`); `575f3348` Clustered lighting optimisations - removed WebGL1 compatibility solut… (at that commit the file was still `src/scene/shader-lib/chunks/lit/frag/clusteredLight.js`) — run `git show` on any of them.
  • Change coupling: compute.js ↔ webgpu-graphics-device.js src/platform/graphics/compute.js — `src/platform/graphics/compute.js` and `src/platform/graphics/webgpu/webgpu-graphics-device.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 `6d3f7fc7` Fix WebGPU recovery for compute, readback and generated data (#9358); `2afdf36f` Add indirect compute dispatch support for WebGPU (#8332); `464ffdbf` Compute shader JSDocs + small API changes (#6258) — run `git show` on any of them.
  • Change coupling: gsplat-params.js ↔ gsplat-quad-renderer.js src/scene/gsplat-unified/gsplat-params.js — `src/scene/gsplat-unified/gsplat-params.js` and `src/scene/gsplat-unified/gsplat-quad-renderer.js` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `512c92cf` Add scene.gsplat.useTonemap to opt splats out of tonemapping and expo…; `c50c292d` refactor: move material preparation behind update version (#9102); `1a1b2c49` Add fog support for Gaussian splat rendering (#8583) — run `git show` on any of them.
D6 · Cohesion (LCOM4) · Low cohesion · ×16
  • 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:93 — 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:156 — 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: Camera (LCOM4 5) src/scene/camera.js:47 — Camera'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/rotate-gizmo.js:68 — 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:56 — 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: 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/translate-gizmo.js:61 — 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.
R4 · Test Coverage · No test reaches this file · ×12
  • No test reaches this file utils/esbuild-build-target.mjs — 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 — 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 — 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 — 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/esbuild-transform-pipeline.mjs — 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/api-surface.mjs — 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/esbuild-import-validation.mjs — 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/rollup-version-revision.mjs — 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/esbuild-strip.mjs — 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/build-size.mjs — 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/rollup-get-banner.mjs — 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 src/scene/shader-lib/glsl/chunks/lit/vert/viewNormal.js — 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.
D10 · Test Quality · No assertions · ×10
  • No assertions: fires a drag:end event when dragging ends via touchend and stops firing drag:move events test/framework/components/element/element-drag-helper.test.mjs:211 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: fires a drag:end event when dragging ends via touchcancel and stops firing drag:move events test/framework/components/element/element-drag-helper.test.mjs:215 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: includes ancestral rotation in coordinate conversion test/framework/components/element/element-drag-helper.test.mjs:265 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: includes ancestral scale in coordinate conversion test/framework/components/element/element-drag-helper.test.mjs:276 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: includes camera rotation in coordinate conversion test/framework/components/element/element-drag-helper.test.mjs:285 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: includes screen scale in coordinate conversion and disables perspective when using screen space test/framework/components/element/element-drag-helper.test.mjs:294 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: supports an element that is a direct child of a screen space screen test/framework/components/element/element-drag-helper.test.mjs:308 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: allows dragging to be constrained to the X axis test/framework/components/element/element-drag-helper.test.mjs:323 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: allows dragging to be constrained to the Y axis test/framework/components/element/element-drag-helper.test.mjs:330 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: takes device pixel ratio into account test/framework/components/element/element-drag-helper.test.mjs:337 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D3 · God Classes · FunctionTooLong · ×8
  • 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 289 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 189 over it, 2.89× 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:2 — FunctionTooLong — SortWorker runs 206 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 106 over it, 2.06× 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:1 — FunctionTooLong — DracoWorker runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× 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:1 — FunctionTooLong — UnifiedSortWorker runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.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.
  • FunctionTooLong: glb-parser.createAnimation src/framework/parsers/glb-parser.js:670 — FunctionTooLong — createAnimation runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standard-material._defineMaterialProps src/scene/materials/standard-material.js:2216 — FunctionTooLong — _defineMaterialProps 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.
  • FunctionTooLong: vat-converter.sampleAnimations scripts/esm/vat/vat-converter.mjs:180 — FunctionTooLong — sampleAnimations runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D35 · Change Coupling · Change-coupling hub · ×4
  • Change-coupling hub: gsplat-manager.js → compute-radix-sort-multipass.js, gsplat-info.js, gsplat-interval-compaction.js, gsplat-octree-instance.js, gsplat-projector.js, gsplat-unified-sort-worker.js, gsplat-work-buffer.js src/scene/gsplat-unified/gsplat-manager.js — `src/scene/gsplat-unified/gsplat-manager.js` changes together with 7 other files — `src/scene/graphics/radix-sort/compute-radix-sort-multipass.js`, `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` — 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: gsplatCommon.js → gsplat.js, gsplatCommon.js, gsplat.js src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplatCommon.js — `src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplatCommon.js` changes together with 3 other files — `src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplat.js`, `src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplatCommon.js`, `src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplat.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: 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, screenDepth.js src/scene/renderer/forward-renderer.js — `src/scene/renderer/forward-renderer.js` changes together with 5 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`, `src/scene/shader-lib/glsl/chunks/common/frag/screenDepth.js` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 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 5.
D2 · Cognitive Complexity · BasisWorker · ×3
  • BasisWorker::transcodeBasis (cognitive 28) src/framework/handlers/basis-worker.js:295 — BasisWorker::transcodeBasis has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (7 pts), boolean chains 5, 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.
  • BasisWorker::transcodeKTX2 (cognitive 26) src/framework/handlers/basis-worker.js:191 — BasisWorker::transcodeKTX2 has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3 (6 pts), ternaries 2 (5 pts), boolean chains 4 (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.
  • BasisWorker::chooseTargetFormat (cognitive 17) src/framework/handlers/basis-worker.js:127 — 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.
R10 · Code Duplication · Duplicated block with local edits (39 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (39 matched lines × 2 locations) src/extras/render-passes/frame-pass-volumetric-fog.js:199 — src/extras/render-passes/frame-pass-volumetric-fog.js:199 · src/extras/render-passes/frame-pass-volumetric-fog.js:495 — the two spans are one implementation copied and then locally edited — 355 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 (39 matched lines × 2 locations) src/framework/handlers/basis-worker.js:218 — src/framework/handlers/basis-worker.js:218 · src/framework/handlers/basis-worker.js:316 — the two spans are one implementation copied and then locally edited — 252 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 (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.
D1 · Cyclomatic Complexity · BasisWorker · ×2
  • BasisWorker::transcodeBasis (cyclomatic 20) src/framework/handlers/basis-worker.js:295 — BasisWorker::transcodeBasis 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.
  • BasisWorker::transcodeKTX2 (cyclomatic 19) src/framework/handlers/basis-worker.js:191 — BasisWorker::transcodeKTX2 has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · update (cyclomatic 17) · ×2
  • update (cyclomatic 17) src/extras/mini-stats/mini-stats.js:722 — 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.
  • update (cyclomatic 17) src/extras/render-passes/camera-frame.js:637 — update 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.
D1 · Cyclomatic Complexity · constructor (cyclomatic 16) · ×2
  • constructor (cyclomatic 16) src/platform/graphics/transform-feedback.js:124 — constructor has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • constructor (cyclomatic 16) src/platform/graphics/vertex-format.js:139 — constructor has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D15 · Churn × Complexity Hotspots · Repeated repair · ×2
  • Repeated repair: src/framework/parsers/sog.js src/framework/parsers/sog.js:127 — src/framework/parsers/sog.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 10 (its worst body is SogParser.loadTextures at line 127), 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 SOG parsers throwing when a load completes after app teardown (#9232)”; “Fix sog streaming re-load returning destroyed textures from loader cache (#9039)”; “Fix crash when unloading sog assets still referenced by the unified world (#9035)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- src/framework/parsers/sog.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: examples/src/examples/gaussian-splatting/depth-of-field.example.mjs examples/src/examples/gaussian-splatting/depth-of-field.example.mjs:170 — examples/src/examples/gaussian-splatting/depth-of-field.example.mjs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is depth-of-field.example.onFrameReady at line 170), 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(examples): Apply settings once the initial values are set (#9640)”; “fix(examples): Restore the depth prepass in the gaussian splat depth-of-field example (#9639)”; “fix: Render gaussian splat crop and depth-of-field examples without MSAA (#9634)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:52:16 +01:00' --until='2026-10-01 15:52:16 +01:00' --full-history --no-merges -- examples/src/examples/gaussian-splatting/depth-of-field.example.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · _drag (cognitive 21) · ×2
  • _drag (cognitive 21) src/extras/gizmo/translate-gizmo.js:465 — _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/scale-gizmo.js:482 — _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.
D2 · Cognitive Complexity · UnifiedSortWorker · ×2
  • UnifiedSortWorker::computeEffectiveDistanceRangeLinear (cognitive 18) src/scene/gsplat-unified/gsplat-unified-sort-worker.js:179 — 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.
  • UnifiedSortWorker::computeEffectiveDistanceRangeRadial (cognitive 16) src/scene/gsplat-unified/gsplat-unified-sort-worker.js:221 — 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
PF3 · Async & latency hygiene · Sync-over-async blocking · ×2
  • Sync-over-async blocking examples/utils/thumbnails.mjs:144 — `takeThumbnails` is async and calls readFileSync, unlinkSync — 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:201 — `takeScreenshots` is async and calls rmSync, existsSync, mkdirSync — 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 (43 lines × 2 locations) · ×2
  • 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.
D1 · Cyclomatic Complexity · constructor (cyclomatic 89) · ×1
  • constructor (cyclomatic 89) src/platform/graphics/render-target.js:356 — constructor has cyclomatic complexity 89 (threshold 15). Of this number, 69 points are the body's own statements and 20 belong to 6 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.
D1 · Cyclomatic Complexity · TextElement._updateMeshes (cyclomatic 85) · ×1
  • TextElement._updateMeshes (cyclomatic 85) src/framework/components/element/text-element.js:863 — TextElement._updateMeshes 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.
D1 · Cyclomatic Complexity · ElementComponentSystem.initializeComponentData (cyclomatic 84) · ×1
  • ElementComponentSystem.initializeComponentData (cyclomatic 84) src/framework/components/element/system.js:105 — ElementComponentSystem.initializeComponentData has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · basis-worker.BasisWorker (cyclomatic 84) · ×1
  • basis-worker.BasisWorker (cyclomatic 84) src/framework/handlers/basis-worker.js:2 — basis-worker.BasisWorker has cyclomatic complexity 84 (threshold 15). Most of this is not in the body itself: 1 of the 84 points is its own statement and the rest belongs to 17 function literals inside it that branch (lines 295, 191, 60, …). 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 · WebglTexture.upload (cyclomatic 74) · ×1
  • WebglTexture.upload (cyclomatic 74) src/platform/graphics/webgl/webgl-texture.js:476 — WebglTexture.upload has cyclomatic complexity 74 (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 is NOT this file's highest cyclomatic complexity: WebglTexture.initialize (cyclomatic 76) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · gsplat-sort-worker.SortWorker (cyclomatic 73) · ×1
  • gsplat-sort-worker.SortWorker (cyclomatic 73) src/scene/gsplat/gsplat-sort-worker.js:2 — gsplat-sort-worker.SortWorker has cyclomatic complexity 73 (threshold 15). Most of this is not in the body itself: 3 of the 73 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 209, 44, 29). 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 · layout-calculator.createCalculator (cyclomatic 72) · ×1
  • layout-calculator.createCalculator (cyclomatic 72) src/framework/components/layout-group/layout-calculator.js:57 — layout-calculator.createCalculator has cyclomatic complexity 72 (threshold 15). Of this number, 71 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.
D1 · Cyclomatic Complexity · TextElement._updateText (cyclomatic 58) · ×1
  • TextElement._updateText (cyclomatic 58) src/framework/components/element/text-element.js:375 — 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.
D1 · Cyclomatic Complexity · ShadowRenderer.cullShadowCastersOmni (cyclomatic 58) · ×1
  • ShadowRenderer.cullShadowCastersOmni (cyclomatic 58) src/scene/renderer/shadow-renderer.js:292 — 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.
D1 · Cyclomatic Complexity · GltfExporter.writeStandardMaterial (cyclomatic 57) · ×1
  • GltfExporter.writeStandardMaterial (cyclomatic 57) src/extras/exporters/gltf-exporter.js:410 — GltfExporter.writeStandardMaterial has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · script-attributes.rawToValue (cyclomatic 56) · ×1
  • 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.
D1 · Cyclomatic Complexity · draco-worker.DracoWorker (cyclomatic 51) · ×1
  • draco-worker.DracoWorker (cyclomatic 51) src/framework/parsers/draco-worker.js:1 — draco-worker.DracoWorker has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 3 of the 51 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 137, 11, 24, …). 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 · constructor (cyclomatic 49) · ×1
  • constructor (cyclomatic 49) src/platform/graphics/webgl/webgl-graphics-device.js:227 — 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.
D1 · Cyclomatic Complexity · UnifiedSortWorker (cyclomatic 48) · ×1
  • UnifiedSortWorker (cyclomatic 48) src/scene/gsplat-unified/gsplat-unified-sort-worker.js:1 — UnifiedSortWorker has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 3 of the 48 points are its own statements and the rest belongs to 12 function items inside it that branch (computeEffectiveDistanceRangeLinear, computeEffectiveDistanceRangeRadial, buildIndexMap, …). 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.
D1 · Cyclomatic Complexity · Preprocessor._preprocess (cyclomatic 45) · ×1
  • Preprocessor._preprocess (cyclomatic 45) src/core/preprocessor.js: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.
D1 · Cyclomatic Complexity · ParticleCPUUpdater.update (cyclomatic 45) · ×1
  • 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.
D1 · Cyclomatic Complexity · _validateCopy (cyclomatic 45) · ×1
  • _validateCopy (cyclomatic 45) src/platform/graphics/texture.js:1482 — _validateCopy has cyclomatic complexity 45 (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.
D1 · Cyclomatic Complexity · StandardMaterialValidator.validate (cyclomatic 43) · ×1
  • 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.
D1 · Cyclomatic Complexity · constructor (cyclomatic 43) · ×1
  • constructor (cyclomatic 43) src/platform/graphics/texture.js:294 — constructor has cyclomatic complexity 43 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ShaderGeneratorStandard.createShaderDefinition (cyclomatic 42) · ×1
  • 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.
D1 · Cyclomatic Complexity · draw (cyclomatic 42) · ×1
  • draw (cyclomatic 42) src/platform/graphics/webgl/webgl-graphics-device.js:2148 — draw has cyclomatic complexity 42 (threshold 15). Of this number, 38 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.
D1 · Cyclomatic Complexity · frameUpdate (cyclomatic 42) · ×1
  • frameUpdate (cyclomatic 42) src/extras/render-passes/render-pass-compose.js:378 — frameUpdate 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.
D1 · Cyclomatic Complexity · RigidBodyComponentSystem.onContactPair (cyclomatic 40) · ×1
  • 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.
D1 · Cyclomatic Complexity · MiniStats.rebuildGeometry (cyclomatic 40) · ×1
  • MiniStats.rebuildGeometry (cyclomatic 40) src/extras/mini-stats/mini-stats.js:770 — 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.
D1 · Cyclomatic Complexity · start (cyclomatic 37) · ×1
  • start (cyclomatic 37) src/framework/xr/xr-manager.js:535 — 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.
D1 · Cyclomatic Complexity · ForwardRenderer.buildFrameGraph (cyclomatic 36) · ×1
  • ForwardRenderer.buildFrameGraph (cyclomatic 36) src/scene/renderer/forward-renderer.js:661 — ForwardRenderer.buildFrameGraph has cyclomatic complexity 36 (threshold 15). Of this number, 35 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.
D1 · Cyclomatic Complexity · log (cyclomatic 36) · ×1
  • log (cyclomatic 36) src/platform/graphics/render-pass.js:404 — 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.
D1 · Cyclomatic Complexity · GSplatBudgetBalancer.balance (cyclomatic 35) · ×1
  • GSplatBudgetBalancer.balance (cyclomatic 35) src/scene/gsplat-unified/gsplat-budget-balancer.js:85 — GSplatBudgetBalancer.balance has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextureRenderer.draw (cyclomatic 35) · ×1
  • TextureRenderer.draw (cyclomatic 35) src/extras/renderers/texture-renderer.js:220 — TextureRenderer.draw has cyclomatic complexity 35 (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.
D1 · Cyclomatic Complexity · BatchManager.create (cyclomatic 34) · ×1
  • BatchManager.create (cyclomatic 34) src/scene/batching/batch-manager.js:677 — 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.
D1 · Cyclomatic Complexity · GSplatBoxShaderEffect.generateLUT (cyclomatic 33) · ×1
  • GSplatBoxShaderEffect.generateLUT (cyclomatic 33) scripts/esm/gsplat/shader-effect-box.mjs:274 — GSplatBoxShaderEffect.generateLUT 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.
D1 · Cyclomatic Complexity · ConeBaseGeometry.constructor (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · Lightmapper.bakeInternal (cyclomatic 33) · ×1
  • Lightmapper.bakeInternal (cyclomatic 33) src/framework/lightmapper/lightmapper.js:932 — Lightmapper.bakeInternal has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · glb-parser.createAnimation (cyclomatic 33) · ×1
  • glb-parser.createAnimation (cyclomatic 33) src/framework/parsers/glb-parser.js:670 — 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 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.
D1 · Cyclomatic Complexity · update (cyclomatic 32) · ×1
  • update (cyclomatic 32) src/framework/handlers/cubemap.js:104 — update has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Texture.setSource (cyclomatic 31) · ×1
  • Texture.setSource (cyclomatic 31) src/platform/graphics/texture.js:1257 — Texture.setSource 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.
D1 · Cyclomatic Complexity · Mesh._initBoneAabbs (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · ScriptComponent.create (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · AnimationComponent.onAssetChanged (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · renderForwardInternal (cyclomatic 31) · ×1
  • renderForwardInternal (cyclomatic 31) src/scene/renderer/forward-renderer.js:281 — 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.
D1 · Cyclomatic Complexity · init (cyclomatic 31) · ×1
  • init (cyclomatic 31) src/platform/graphics/webgl/webgl-render-target.js:147 — init has cyclomatic complexity 31 (threshold 15). Of this number, 29 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.
D1 · Cyclomatic Complexity · XrManipulation.update (cyclomatic 30) · ×1
  • XrManipulation.update (cyclomatic 30) scripts/esm/xr/xr-manipulation.mjs:552 — XrManipulation.update has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BatchManager.prepare (cyclomatic 30) · ×1
  • BatchManager.prepare (cyclomatic 30) src/scene/batching/batch-manager.js:474 — 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.
D1 · Cyclomatic Complexity · render-physics.RenderPhysics.postUpdate (cyclomatic 29) · ×1
  • render-physics.RenderPhysics.postUpdate (cyclomatic 29) scripts/physics/render-physics.js:71 — render-physics.RenderPhysics.postUpdate has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 81, 205). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ParticleEmitter.rebuild (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · DdsParser.open (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · AssetRegistry.load (cyclomatic 29) · ×1
  • 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 literals inside it that branch (lines 482, 519, 472). 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 · WebgpuTexture.uploadData (cyclomatic 29) · ×1
  • WebgpuTexture.uploadData (cyclomatic 29) src/platform/graphics/webgpu/webgpu-texture.js:366 — WebgpuTexture.uploadData 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.
D1 · Cyclomatic Complexity · renderForwardLayer (cyclomatic 29) · ×1
  • renderForwardLayer (cyclomatic 29) src/scene/renderer/forward-renderer.js:485 — renderForwardLayer has cyclomatic complexity 29 (threshold 15). Of this number, 22 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · reprojectTexture (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · GSplatWorld.update (cyclomatic 28) · ×1
  • GSplatWorld.update (cyclomatic 28) src/scene/gsplat-unified/gsplat-world.js:462 — 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.
D1 · Cyclomatic Complexity · GSplatWorld._updateWorldState (cyclomatic 28) · ×1
  • GSplatWorld._updateWorldState (cyclomatic 28) src/scene/gsplat-unified/gsplat-world.js:609 — GSplatWorld._updateWorldState has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · setupForRenderPass (cyclomatic 28) · ×1
  • setupForRenderPass (cyclomatic 28) src/platform/graphics/webgpu/webgpu-render-target.js:578 — 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.
D1 · Cyclomatic Complexity · glb-parser.createImages (cyclomatic 27) · ×1
  • glb-parser.createImages (cyclomatic 27) src/framework/parsers/glb-parser.js:1358 — 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 literals inside it that branch (lines 1381, 1418, 1478, …). 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 · TextureAtlasHandler.patch (cyclomatic 27) · ×1
  • TextureAtlasHandler.patch (cyclomatic 27) src/framework/handlers/texture-atlas.js:110 — TextureAtlasHandler.patch has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · draw (cyclomatic 27) · ×1
  • draw (cyclomatic 27) src/platform/graphics/webgpu/webgpu-graphics-device.js:1339 — draw has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Http.request (cyclomatic 26) · ×1
  • 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 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.
D1 · Cyclomatic Complexity · ResourceLoader.load (cyclomatic 26) · ×1
  • ResourceLoader.load (cyclomatic 26) src/framework/handlers/loader.js:124 — 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 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.
D1 · Cyclomatic Complexity · copyRenderTarget (cyclomatic 26) · ×1
  • copyRenderTarget (cyclomatic 26) src/platform/graphics/webgpu/webgpu-graphics-device.js:2081 — copyRenderTarget 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.
D1 · Cyclomatic Complexity · _setupLight (cyclomatic 26) · ×1
  • _setupLight (cyclomatic 26) src/extras/render-passes/frame-pass-volumetric-fog.js:465 — _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.
D1 · Cyclomatic Complexity · Water._frameUpdate (cyclomatic 25) · ×1
  • Water._frameUpdate (cyclomatic 25) scripts/esm/water.mjs:1607 — Water._frameUpdate has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GSplatDirector.update (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · StandardMaterialOptionsBuilder._updateMaterialOptions (cyclomatic 25) · ×1
  • StandardMaterialOptionsBuilder._updateMaterialOptions (cyclomatic 25) src/scene/materials/standard-material-options-builder.js:219 — StandardMaterialOptionsBuilder._updateMaterialOptions has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function 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.
D1 · Cyclomatic Complexity · ObjModelParser.parse (cyclomatic 24) · ×1
  • ObjModelParser.parse (cyclomatic 24) scripts/esm/parsers/obj-model.mjs:48 — ObjModelParser.parse has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Preprocessor.processParentheses (cyclomatic 24) · ×1
  • Preprocessor.processParentheses (cyclomatic 24) src/core/preprocessor.js: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.
D1 · Cyclomatic Complexity · LayerComposition._update (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · GSplatOctreeInstance.applyLodChanges (cyclomatic 24) · ×1
  • GSplatOctreeInstance.applyLodChanges (cyclomatic 24) src/scene/gsplat-unified/gsplat-octree-instance.js:634 — GSplatOctreeInstance.applyLodChanges has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ElementComponentSystem.getImageElementMaterial (cyclomatic 24) · ×1
  • ElementComponentSystem.getImageElementMaterial (cyclomatic 24) src/framework/components/element/system.js:448 — 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.
D1 · Cyclomatic Complexity · WebglGraphicsDevice.copyRenderTarget (cyclomatic 24) · ×1
  • WebglGraphicsDevice.copyRenderTarget (cyclomatic 24) src/platform/graphics/webgl/webgl-graphics-device.js:1321 — 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.
D1 · Cyclomatic Complexity · glb-parser.createMaterial (cyclomatic 24) · ×1
  • glb-parser.createMaterial (cyclomatic 24) src/framework/parsers/glb-parser.js:531 — 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.
D1 · Cyclomatic Complexity · initFromGpuDevice (cyclomatic 24) · ×1
  • initFromGpuDevice (cyclomatic 24) src/platform/graphics/webgpu/webgpu-graphics-device.js:765 — initFromGpuDevice has cyclomatic complexity 24 (threshold 15). Of this number, 22 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.
D1 · Cyclomatic Complexity · XrMenu._updateRayInteraction (cyclomatic 23) · ×1
  • XrMenu._updateRayInteraction (cyclomatic 23) scripts/esm/xr/xr-menu.mjs:1548 — XrMenu._updateRayInteraction has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebglGraphicsDevice.endRenderPass (cyclomatic 23) · ×1
  • WebglGraphicsDevice.endRenderPass (cyclomatic 23) src/platform/graphics/webgl/webgl-graphics-device.js:1603 — 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.
D1 · Cyclomatic Complexity · GlbContainerResource.instantiateRenderEntity (cyclomatic 23) · ×1
  • GlbContainerResource.instantiateRenderEntity (cyclomatic 23) src/framework/parsers/glb-container-resource.js:96 — GlbContainerResource.instantiateRenderEntity has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 141, 101). 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 · texture._completePartialMipmapChain (cyclomatic 23) · ×1
  • 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 literals 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.
D1 · Cyclomatic Complexity · StandardMaterialOptionsBuilder._updateEnvOptions (cyclomatic 23) · ×1
  • StandardMaterialOptionsBuilder._updateEnvOptions (cyclomatic 23) src/scene/materials/standard-material-options-builder.js:301 — StandardMaterialOptionsBuilder._updateEnvOptions has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · constructor (cyclomatic 23) · ×1
  • 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 221, 201, 207, …). 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 · tween.Tween.start (cyclomatic 22) · ×1
  • tween.Tween.start (cyclomatic 22) scripts/animation/tween.js:191 — tween.Tween.start has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 243, 276, 281, …). 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 · system.recreateShapes (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · khr-gaussian-splatting.createGSplatData (cyclomatic 22) · ×1
  • 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 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.
D1 · Cyclomatic Complexity · XrHand.update (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · AnimController.updateStateFromTransition (cyclomatic 22) · ×1
  • AnimController.updateStateFromTransition (cyclomatic 22) src/framework/anim/controller/anim-controller.js:422 — AnimController.updateStateFromTransition has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultAnimBinder.constructor (cyclomatic 22) · ×1
  • 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 literals inside it that branch (lines 34, 81, 118, …). 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 · Skeleton.addTime (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · AnimationComponent.update (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · webgpu-shader-processor-wgsl.getTextureDeclarationType (cyclomatic 22) · ×1
  • webgpu-shader-processor-wgsl.getTextureDeclarationType (cyclomatic 22) src/platform/graphics/webgpu/webgpu-shader-processor-wgsl.js: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.
D1 · Cyclomatic Complexity · resolveDuplicatedEntityReferenceProperties (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · _createProjectorCompute (cyclomatic 22) · ×1
  • _createProjectorCompute (cyclomatic 22) src/scene/gsplat-unified/gsplat-projector.js:403 — _createProjectorCompute has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 12 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createDefinition (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · TagsCache.find (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · FrameGraph._compilePasses (cyclomatic 21) · ×1
  • FrameGraph._compilePasses (cyclomatic 21) src/scene/frame-graph.js:120 — FrameGraph._compilePasses 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.
D1 · Cyclomatic Complexity · ShadowRendererDirectional.cull (cyclomatic 21) · ×1
  • ShadowRendererDirectional.cull (cyclomatic 21) src/scene/renderer/shadow-renderer-directional.js:100 — 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.
D1 · Cyclomatic Complexity · ElementInput._onElementSelectEvent (cyclomatic 21) · ×1
  • ElementInput._onElementSelectEvent (cyclomatic 21) src/framework/input/element-input.js:837 — ElementInput._onElementSelectEvent has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SpriteComponentSystem.initializeComponentData (cyclomatic 21) · ×1
  • SpriteComponentSystem.initializeComponentData (cyclomatic 21) src/framework/components/sprite/system.js:152 — SpriteComponentSystem.initializeComponentData has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ScriptRegistry.add (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · AnimController.update (cyclomatic 21) · ×1
  • AnimController.update (cyclomatic 21) src/framework/anim/controller/anim-controller.js:609 — AnimController.update has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · applySettings (cyclomatic 21) · ×1
  • applySettings (cyclomatic 21) src/scene/gsplat-unified/gsplat-params.js:1097 — 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.
D1 · Cyclomatic Complexity · GraphicsDevice.initCapsDefines (cyclomatic 20) · ×1
  • GraphicsDevice.initCapsDefines (cyclomatic 20) src/platform/graphics/graphics-device.js:840 — 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.
D1 · Cyclomatic Complexity · GSplatShadowRenderer._cullEntry (cyclomatic 20) · ×1
  • GSplatShadowRenderer._cullEntry (cyclomatic 20) src/scene/gsplat-unified/gsplat-shadow-renderer.js:548 — GSplatShadowRenderer._cullEntry 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.
D1 · Cyclomatic Complexity · khr-draco-mesh-compression.createDracoMesh (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · basis.basisInitialize (cyclomatic 20) · ×1
  • basis.basisInitialize (cyclomatic 20) src/framework/handlers/basis.js:268 — 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.
D1 · Cyclomatic Complexity · MaterialHandler._bindAndAssignAssets (cyclomatic 20) · ×1
  • MaterialHandler._bindAndAssignAssets (cyclomatic 20) src/framework/handlers/material.js:173 — 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.
D1 · Cyclomatic Complexity · AppBase._parseApplicationProperties (cyclomatic 20) · ×1
  • AppBase._parseApplicationProperties (cyclomatic 20) src/framework/app-base.js:858 — 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.
D1 · Cyclomatic Complexity · init (cyclomatic 20) · ×1
  • init (cyclomatic 20) src/framework/app-base.js:567 — 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.
D1 · Cyclomatic Complexity · shadowType (cyclomatic 20) · ×1
  • shadowType (cyclomatic 20) src/scene/light.js:503 — 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.
D1 · Cyclomatic Complexity · EventHandler.off (cyclomatic 19) · ×1
  • EventHandler.off (cyclomatic 19) src/core/event-handler.js:167 — 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.
D1 · Cyclomatic Complexity · GSplatProjector.dispatch (cyclomatic 19) · ×1
  • GSplatProjector.dispatch (cyclomatic 19) src/scene/gsplat-unified/gsplat-projector.js:646 — GSplatProjector.dispatch has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · ParticleSystemComponentSystem.initializeComponentData (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · Lightmapper.collectModels (cyclomatic 19) · ×1
  • Lightmapper.collectModels (cyclomatic 19) src/framework/lightmapper/lightmapper.js:309 — Lightmapper.collectModels has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CubemapHandler.loadAssets (cyclomatic 19) · ×1
  • 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 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.
D1 · Cyclomatic Complexity · JsonStandardMaterialParser.initialize (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · HdrParser._readPixels (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · AnimController._findTransition (cyclomatic 19) · ×1
  • AnimController._findTransition (cyclomatic 19) src/framework/anim/controller/anim-controller.js:342 — AnimController._findTransition has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · startRenderPass (cyclomatic 19) · ×1
  • startRenderPass (cyclomatic 19) src/platform/graphics/webgl/webgl-graphics-device.js:1490 — 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.
D1 · Cyclomatic Complexity · frameStart (cyclomatic 19) · ×1
  • frameStart (cyclomatic 19) src/platform/graphics/graphics-device.js:1780 — 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 ((anonymous)::(anonymous), (anonymous)::(anonymous), (anonymous), …). 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.
D1 · Cyclomatic Complexity · setCameraUniforms (cyclomatic 19) · ×1
  • setCameraUniforms (cyclomatic 19) src/scene/renderer/renderer.js:468 — setCameraUniforms has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · attachTexture (cyclomatic 19) · ×1
  • attachTexture (cyclomatic 19) src/extras/exporters/gltf-exporter.js:350 — attachTexture has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · get (cyclomatic 19) · ×1
  • get (cyclomatic 19) src/platform/graphics/webgpu/webgpu-render-pipeline.js:202 — get has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · load (cyclomatic 19) · ×1
  • load (cyclomatic 19) src/framework/parsers/sog-bundle.js:188 — load has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 12 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · build.main (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · XrMenu._checkFingerTouch (cyclomatic 18) · ×1
  • XrMenu._checkFingerTouch (cyclomatic 18) scripts/esm/xr/xr-menu.mjs:1333 — XrMenu._checkFingerTouch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EventHandler.fire (cyclomatic 18) · ×1
  • EventHandler.fire (cyclomatic 18) src/core/event-handler.js:287 — EventHandler.fire 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.
D1 · Cyclomatic Complexity · GraphicsDevice.getRenderableHdrFormat (cyclomatic 18) · ×1
  • GraphicsDevice.getRenderableHdrFormat (cyclomatic 18) src/platform/graphics/graphics-device.js:1905 — 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.
D1 · Cyclomatic Complexity · StandardMaterialMapTransforms.update (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · Mesh.update (cyclomatic 18) · ×1
  • Mesh.update (cyclomatic 18) src/scene/mesh.js:922 — 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.
D1 · Cyclomatic Complexity · ply.readPly (cyclomatic 18) · ×1
  • 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 literals inside it that branch (lines 459, 483, 544, …). 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 · MeshInstance.getMaterialBindGroup (cyclomatic 18) · ×1
  • MeshInstance.getMaterialBindGroup (cyclomatic 18) src/scene/mesh-instance.js:1749 — 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.
D1 · Cyclomatic Complexity · Culler.updateLightVisibility (cyclomatic 18) · ×1
  • Culler.updateLightVisibility (cyclomatic 18) src/scene/renderer/culler.js:342 — 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.
D1 · Cyclomatic Complexity · ImageElement._updateMesh (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · ModelComponentSystem.cloneComponent (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · WebglGraphicsDevice.setTextureParameters (cyclomatic 18) · ×1
  • WebglGraphicsDevice.setTextureParameters (cyclomatic 18) src/platform/graphics/webgl/webgl-graphics-device.js:1865 — 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.
D1 · Cyclomatic Complexity · MouseEvent.constructor (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · evaluateNodeDistances (cyclomatic 18) · ×1
  • evaluateNodeDistances (cyclomatic 18) src/scene/gsplat-unified/gsplat-octree-instance.js:503 — evaluateNodeDistances has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _draw (cyclomatic 18) · ×1
  • _draw (cyclomatic 18) src/extras/renderers/texture-renderer.js:283 — _draw 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.
D1 · Cyclomatic Complexity · instantiateRenderEntity · ×1
  • instantiateRenderEntity::cloneHierarchy (cyclomatic 18) src/framework/parsers/glb-container-resource.js:141 — 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.
D1 · Cyclomatic Complexity · update (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · AnnotationManager.initialize (cyclomatic 17) · ×1
  • AnnotationManager.initialize (cyclomatic 17) scripts/esm/annotations.mjs:812 — AnnotationManager.initialize has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 918, 889, 825, …). 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 · XrMenu.update (cyclomatic 17) · ×1
  • XrMenu.update (cyclomatic 17) scripts/esm/xr/xr-menu.mjs:1439 — XrMenu.update has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WorldClustersDebug.render (cyclomatic 17) · ×1
  • WorldClustersDebug.render (cyclomatic 17) src/scene/lighting/world-clusters-debug.js:54 — WorldClustersDebug.render has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function 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.
D1 · Cyclomatic Complexity · LightsBuffer.addLightData (cyclomatic 17) · ×1
  • LightsBuffer.addLightData (cyclomatic 17) src/scene/lighting/lights-buffer.js:194 — LightsBuffer.addLightData has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GSplatBudgetBalancer._accumulate (cyclomatic 17) · ×1
  • GSplatBudgetBalancer._accumulate (cyclomatic 17) src/scene/gsplat-unified/gsplat-budget-balancer.js:219 — GSplatBudgetBalancer._accumulate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CollisionComponent.onEnable (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · TextElement.font (cyclomatic 17) · ×1
  • TextElement.font (cyclomatic 17) src/framework/components/element/text-element.js:1855 — 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.
D1 · Cyclomatic Complexity · ElementComponent._sync (cyclomatic 17) · ×1
  • ElementComponent._sync (cyclomatic 17) src/framework/components/element/component.js:2218 — 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.
D1 · Cyclomatic Complexity · ModelComponent.onEnable (cyclomatic 17) · ×1
  • ModelComponent.onEnable (cyclomatic 17) src/framework/components/model/component.js:981 — 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.
D1 · Cyclomatic Complexity · ElementInput._onElementMouseEvent (cyclomatic 17) · ×1
  • ElementInput._onElementMouseEvent (cyclomatic 17) src/framework/input/element-input.js:719 — ElementInput._onElementMouseEvent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SpriteComponent._showFrame (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · glb-parser.createMesh (cyclomatic 17) · ×1
  • glb-parser.createMesh (cyclomatic 17) src/framework/parsers/glb-parser.js:418 — 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 422, 488). 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 · AnimComponentBinder._createAnimTargetForProperty (cyclomatic 17) · ×1
  • AnimComponentBinder._createAnimTargetForProperty (cyclomatic 17) src/framework/components/anim/component-binder.js:211 — AnimComponentBinder._createAnimTargetForProperty has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ShadowRenderer.submitCasters (cyclomatic 17) · ×1
  • ShadowRenderer.submitCasters (cyclomatic 17) src/scene/renderer/shadow-renderer.js:563 — 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.
D1 · Cyclomatic Complexity · ResourceLine.equals (cyclomatic 17) · ×1
  • ResourceLine.equals (cyclomatic 17) src/platform/graphics/webgpu/webgpu-shader-processor-wgsl.js: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.
D1 · Cyclomatic Complexity · typedoc-plugin.load (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · sanitizeOptions (cyclomatic 17) · ×1
  • sanitizeOptions (cyclomatic 17) src/extras/render-passes/frame-pass-camera-frame.js:250 — sanitizeOptions has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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. This is NOT this file's highest cyclomatic complexity: needsReset (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _updateTexOptions (cyclomatic 17) · ×1
  • _updateTexOptions (cyclomatic 17) src/scene/materials/standard-material-options-builder.js:145 — _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.
D1 · Cyclomatic Complexity · renderLayerRenderStep (cyclomatic 17) · ×1
  • renderLayerRenderStep (cyclomatic 17) src/scene/renderer/render-pass-forward.js:346 — renderLayerRenderStep has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · constructor · ×1
  • constructor::read (cyclomatic 17) src/scene/gsplat/gsplat-sog-data.js:64 — constructor::read has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · tween.Tween.initialize (cyclomatic 16) · ×1
  • tween.Tween.initialize (cyclomatic 16) scripts/animation/tween.js:121 — tween.Tween.initialize has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 149, 170, 160). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · gsplat-mesh.rasterizeTriangle (cyclomatic 16) · ×1
  • gsplat-mesh.rasterizeTriangle (cyclomatic 16) scripts/esm/gsplat/gsplat-mesh.mjs:34 — gsplat-mesh.rasterizeTriangle has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GSplatText._rebuildFromText (cyclomatic 16) · ×1
  • GSplatText._rebuildFromText (cyclomatic 16) scripts/esm/gsplat/gsplat-text.mjs:131 — GSplatText._rebuildFromText has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BlockAllocator._defragIncremental (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · uri.createURI (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · ShaderGeneratorStandard._addMapDefines (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · MeshInstance.aabb (cyclomatic 16) · ×1
  • MeshInstance.aabb (cyclomatic 16) src/scene/mesh-instance.js:827 — 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.
D1 · Cyclomatic Complexity · GSplatWorldState.assignSplatOffsets (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · GSplatWorld.applyWorkBufferUpdates (cyclomatic 16) · ×1
  • GSplatWorld.applyWorkBufferUpdates (cyclomatic 16) src/scene/gsplat-unified/gsplat-world.js:956 — 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 969). 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.
D1 · Cyclomatic Complexity · GSplatManager.update (cyclomatic 16) · ×1
  • GSplatManager.update (cyclomatic 16) src/scene/gsplat-unified/gsplat-manager.js:649 — GSplatManager.update has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · system.convertValue (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · ModelComponent.mapping (cyclomatic 16) · ×1
  • ModelComponent.mapping (cyclomatic 16) src/framework/components/model/component.js:728 — 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.
D1 · Cyclomatic Complexity · ShaderGeneratorParticle.createVertexDefines (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · ParticleEmitter._allocate (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · ParticleEmitter.addTime (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · ShaderProcessorGLSL.processUniforms (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · Asset.file (cyclomatic 16) · ×1
  • Asset.file (cyclomatic 16) src/framework/asset/asset.js:448 — 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.
D1 · Cyclomatic Complexity · GltfExporter.collectResources (cyclomatic 16) · ×1
  • GltfExporter.collectResources (cyclomatic 16) src/extras/exporters/gltf-exporter.js:147 — 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 173, 223, 181). 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 · WebgpuTexture.getSampler (cyclomatic 16) · ×1
  • WebgpuTexture.getSampler (cyclomatic 16) src/platform/graphics/webgpu/webgpu-texture.js:264 — WebgpuTexture.getSampler 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.
D1 · Cyclomatic Complexity · clear (cyclomatic 16) · ×1
  • clear (cyclomatic 16) src/platform/graphics/webgl/webgl-graphics-device.js:2383 — 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.
D1 · Cyclomatic Complexity · createPrimitive (cyclomatic 16) · ×1
  • createPrimitive (cyclomatic 16) src/extras/exporters/gltf-exporter.js:757 — 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 767, 778, 777, …). 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 · watchUnbundled (cyclomatic 16) · ×1
  • watchUnbundled (cyclomatic 16) utils/esbuild-build-target.mjs:556 — watchUnbundled 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 14 function items inside it that branch (update, queue, rebuild::(anonymous), …). 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.
D2 · Cognitive Complexity · _updateMeshes (cognitive 221) · ×1
  • _updateMeshes (cognitive 221) src/framework/components/element/text-element.js:863 — _updateMeshes has cognitive complexity 221 (threshold 15). Drivers by points: if/else 48 (140 pts), loops 12 (37 pts), boolean chains 23, ternaries 8 (21 pts) (nesting depth added 130). Of this number, 212 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.
D2 · Cognitive Complexity · WebglTexture.upload (cognitive 197) · ×1
  • WebglTexture.upload (cognitive 197) src/platform/graphics/webgl/webgl-texture.js:476 — WebglTexture.upload has cognitive complexity 197 (threshold 15). Drivers by points: if/else 54 (154 pts), loops 6 (22 pts), boolean chains 21 (nesting depth added 116). 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 · draw (cognitive 159) · ×1
  • draw (cognitive 159) src/platform/graphics/webgl/webgl-graphics-device.js:2148 — draw has cognitive complexity 159 (threshold 15). Drivers by points: if/else 39 (125 pts), loops 5 (19 pts), ternaries 2 (9 pts), boolean chains 5, other 1 (nesting depth added 107). Of this number, 148 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.
D2 · Cognitive Complexity · gsplat-sort-worker.SortWorker (cognitive 145) · ×1
  • gsplat-sort-worker.SortWorker (cognitive 145) src/scene/gsplat/gsplat-sort-worker.js:2 — gsplat-sort-worker.SortWorker has cognitive complexity 145 (threshold 15). Drivers by points: if/else 42 (103 pts), loops 14 (29 pts), ternaries 4 (7 pts), boolean chains 6 (nesting depth added 79). Most of this is not in the body itself: 2 of the 145 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 209, 44, 29). 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 · initializeComponentData (cognitive 128) · ×1
  • initializeComponentData (cognitive 128) src/framework/components/element/system.js:105 — initializeComponentData has cognitive complexity 128 (threshold 15). Drivers by points: if/else 71 (117 pts), boolean chains 10, ternaries 1 (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.
D2 · Cognitive Complexity · _updateText (cognitive 123) · ×1
  • _updateText (cognitive 123) src/framework/components/element/text-element.js:375 — _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.
D2 · Cognitive Complexity · Preprocessor._preprocess (cognitive 113) · ×1
  • Preprocessor._preprocess (cognitive 113) src/core/preprocessor.js: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.
D2 · Cognitive Complexity · rawToValue (cognitive 106) · ×1
  • 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.
D2 · Cognitive Complexity · constructor (cognitive 105) · ×1
  • constructor (cognitive 105) src/platform/graphics/render-target.js:356 — constructor has cognitive complexity 105 (threshold 15). Drivers by points: if/else 39 (53 pts), other 20, boolean chains 18, ternaries 10 (14 pts) (nesting depth added 18). Of this number, 80 points are the body's own statements and 25 belong to 6 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.
D2 · Cognitive Complexity · update (cognitive 105) · ×1
  • 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.
D2 · Cognitive Complexity · Mesh._initBoneAabbs (cognitive 101) · ×1
  • 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.
D2 · Cognitive Complexity · Lightmapper.bakeInternal (cognitive 97) · ×1
  • Lightmapper.bakeInternal (cognitive 97) src/framework/lightmapper/lightmapper.js:932 — Lightmapper.bakeInternal has cognitive complexity 97 (threshold 15). Drivers by points: if/else 13 (50 pts), loops 11 (28 pts), ternaries 3 (15 pts), boolean chains 4 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · create (cognitive 97) · ×1
  • create (cognitive 97) src/scene/batching/batch-manager.js:677 — 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.
D2 · Cognitive Complexity · RigidBodyComponentSystem.onContactPair (cognitive 96) · ×1
  • 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.
D2 · Cognitive Complexity · StandardMaterialValidator.validate (cognitive 91) · ×1
  • 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.
D2 · Cognitive Complexity · layout-calculator.createCalculator (cognitive 90) · ×1
  • layout-calculator.createCalculator (cognitive 90) src/framework/components/layout-group/layout-calculator.js:57 — layout-calculator.createCalculator has cognitive complexity 90 (threshold 15). Drivers by points: if/else 27 (44 pts), loops 21 (29 pts), boolean chains 12, ternaries 2 (4 pts), match/switch 1 (nesting depth added 27). Of this number, 89 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.
D2 · Cognitive Complexity · onAssetChanged (cognitive 88) · ×1
  • 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.
D2 · Cognitive Complexity · log (cognitive 88) · ×1
  • log (cognitive 88) src/platform/graphics/render-pass.js:404 — 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.
D2 · Cognitive Complexity · init (cognitive 86) · ×1
  • init (cognitive 86) src/platform/graphics/webgl/webgl-render-target.js:147 — init has cognitive complexity 86 (threshold 15). Drivers by points: if/else 20 (52 pts), ternaries 7 (25 pts), loops 2 (5 pts), boolean chains 2, other 2 (nesting depth added 53). Of this number, 83 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.
D2 · Cognitive Complexity · frameUpdate (cognitive 86) · ×1
  • frameUpdate (cognitive 86) src/extras/render-passes/render-pass-compose.js:378 — frameUpdate has cognitive complexity 86 (threshold 15). Drivers by points: if/else 18 (49 pts), ternaries 16 (30 pts), other 5, boolean chains 1, loops 1 (nesting depth added 45). 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 · ShaderGeneratorStandard.createShaderDefinition (cognitive 81) · ×1
  • ShaderGeneratorStandard.createShaderDefinition (cognitive 81) src/scene/shader-lib/programs/standard.js:355 — ShaderGeneratorStandard.createShaderDefinition has cognitive complexity 81 (threshold 15). Drivers by points: if/else 23 (51 pts), ternaries 6 (23 pts), boolean chains 7 (nesting depth added 45). 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 · GltfExporter.writeStandardMaterial (cognitive 79) · ×1
  • GltfExporter.writeStandardMaterial (cognitive 79) src/extras/exporters/gltf-exporter.js:410 — GltfExporter.writeStandardMaterial has cognitive complexity 79 (threshold 15). Drivers by points: if/else 40 (65 pts), boolean chains 11, ternaries 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.
D2 · Cognitive Complexity · basis-worker.BasisWorker (cognitive 78) · ×1
  • basis-worker.BasisWorker (cognitive 78) src/framework/handlers/basis-worker.js:2 — basis-worker.BasisWorker has cognitive complexity 78 (threshold 15). Drivers by points: if/else 28 (43 pts), loops 8 (12 pts), boolean chains 11, ternaries 7 (9 pts), match/switch 2, error handling 1 (nesting depth added 21). Most of this is not in the body itself: 0 of the 78 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 295, 191, 127, …). 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 · ConeBaseGeometry.constructor (cognitive 77) · ×1
  • 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.
D2 · Cognitive Complexity · GSplatBoxShaderEffect.generateLUT (cognitive 76) · ×1
  • GSplatBoxShaderEffect.generateLUT (cognitive 76) scripts/esm/gsplat/shader-effect-box.mjs:274 — GSplatBoxShaderEffect.generateLUT has cognitive complexity 76 (threshold 15). Drivers by points: if/else 19 (39 pts), ternaries 8 (31 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 44). 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 · ElementComponentSystem.getImageElementMaterial (cognitive 76) · ×1
  • ElementComponentSystem.getImageElementMaterial (cognitive 76) src/framework/components/element/system.js:448 — 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.
D2 · Cognitive Complexity · WebgpuTexture.uploadData (cognitive 75) · ×1
  • WebgpuTexture.uploadData (cognitive 75) src/platform/graphics/webgpu/webgpu-texture.js:366 — WebgpuTexture.uploadData has cognitive complexity 75 (threshold 15). Drivers by points: if/else 25 (58 pts), loops 3 (13 pts), boolean chains 4 (nesting depth added 43). 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 · GSplatBudgetBalancer.balance (cognitive 73) · ×1
  • GSplatBudgetBalancer.balance (cognitive 73) src/scene/gsplat-unified/gsplat-budget-balancer.js:85 — GSplatBudgetBalancer.balance has cognitive complexity 73 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 9 (19 pts), ternaries 3 (11 pts), boolean chains 2 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForwardRenderer.buildFrameGraph (cognitive 73) · ×1
  • ForwardRenderer.buildFrameGraph (cognitive 73) src/scene/renderer/forward-renderer.js:661 — ForwardRenderer.buildFrameGraph has cognitive complexity 73 (threshold 15). Drivers by points: if/else 17 (54 pts), boolean chains 12, ternaries 2 (6 pts), loops 1 (nesting depth added 41). Of this number, 70 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.
D2 · Cognitive Complexity · LayerComposition._update (cognitive 69) · ×1
  • 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.
D2 · Cognitive Complexity · gsplat-unified-sort-worker.UnifiedSortWorker (cognitive 69) · ×1
  • gsplat-unified-sort-worker.UnifiedSortWorker (cognitive 69) src/scene/gsplat-unified/gsplat-unified-sort-worker.js:1 — gsplat-unified-sort-worker.UnifiedSortWorker has cognitive complexity 69 (threshold 15). Drivers by points: ternaries 12 (26 pts), if/else 13 (18 pts), loops 13 (18 pts), boolean chains 6, match/switch 1 (nesting depth added 24). Most of this is not in the body itself: 2 of the 69 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 179, 221, 321, …). 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 · rebuildGeometry (cognitive 66) · ×1
  • rebuildGeometry (cognitive 66) src/extras/mini-stats/mini-stats.js:770 — 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.
D2 · Cognitive Complexity · GSplatDirector.update (cognitive 64) · ×1
  • 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.
D2 · Cognitive Complexity · create (cognitive 64) · ×1
  • 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.
D2 · Cognitive Complexity · GlbContainerResource.instantiateRenderEntity (cognitive 61) · ×1
  • GlbContainerResource.instantiateRenderEntity (cognitive 61) src/framework/parsers/glb-container-resource.js:96 — GlbContainerResource.instantiateRenderEntity has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (48 pts), loops 5 (12 pts), ternaries 1 (nesting depth added 39). Most of this is not in the body itself: 1 of the 61 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 141, 101). 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 · render-physics.RenderPhysics.postUpdate (cognitive 60) · ×1
  • render-physics.RenderPhysics.postUpdate (cognitive 60) scripts/physics/render-physics.js:71 — render-physics.RenderPhysics.postUpdate has cognitive complexity 60 (threshold 15). Drivers by points: if/else 15 (48 pts), match/switch 2 (9 pts), boolean chains 3 (nesting depth added 40). Most of this is not in the body itself: 1 of the 60 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 81, 205). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GSplatOctreeInstance.applyLodChanges (cognitive 60) · ×1
  • GSplatOctreeInstance.applyLodChanges (cognitive 60) src/scene/gsplat-unified/gsplat-octree-instance.js:634 — GSplatOctreeInstance.applyLodChanges has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (47 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · start (cognitive 60) · ×1
  • start (cognitive 60) src/framework/xr/xr-manager.js:535 — 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.
D2 · Cognitive Complexity · TagsCache.find (cognitive 59) · ×1
  • 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.
D2 · Cognitive Complexity · Texture.setSource (cognitive 57) · ×1
  • Texture.setSource (cognitive 57) src/platform/graphics/texture.js:1257 — Texture.setSource has cognitive complexity 57 (threshold 15). Drivers by points: if/else 22 (40 pts), loops 3 (9 pts), boolean chains 8 (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.
D2 · Cognitive Complexity · ObjModelParser.parse (cognitive 56) · ×1
  • ObjModelParser.parse (cognitive 56) scripts/esm/parsers/obj-model.mjs:48 — ObjModelParser.parse has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (45 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResourceLoader.load (cognitive 56) · ×1
  • ResourceLoader.load (cognitive 56) src/framework/handlers/loader.js:124 — 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 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.
D2 · Cognitive Complexity · ShadowRenderer.cullShadowCastersOmni (cognitive 56) · ×1
  • ShadowRenderer.cullShadowCastersOmni (cognitive 56) src/scene/renderer/shadow-renderer.js:292 — 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.
D2 · Cognitive Complexity · draw (cognitive 56) · ×1
  • draw (cognitive 56) src/platform/graphics/webgpu/webgpu-graphics-device.js:1339 — draw has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 6, ternaries 2 (6 pts), loops 1 (3 pts), other 3 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · instantiateRenderEntity · ×1
  • instantiateRenderEntity::cloneHierarchy (cognitive 56) src/framework/parsers/glb-container-resource.js:141 — 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.
D2 · Cognitive Complexity · update (cognitive 55) · ×1
  • update (cognitive 55) src/framework/handlers/cubemap.js:104 — update has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 14, ternaries 4 (12 pts), loops 4 (10 pts), other 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnimController.update (cognitive 54) · ×1
  • AnimController.update (cognitive 54) src/framework/anim/controller/anim-controller.js:609 — AnimController.update has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 6 (19 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · system.recreateShapes (cognitive 53) · ×1
  • 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.
D2 · Cognitive Complexity · createAnimation (cognitive 52) · ×1
  • createAnimation (cognitive 52) src/framework/parsers/glb-parser.js:670 — 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.
D2 · Cognitive Complexity · AssetRegistry.load (cognitive 51) · ×1
  • AssetRegistry.load (cognitive 51) src/framework/asset/asset-registry.js:462 — AssetRegistry.load has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (37 pts), boolean chains 9, loops 2 (5 pts) (nesting depth added 20). Of this number, 21 points are the body's own statements and 30 belong to 3 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.
D2 · Cognitive Complexity · resolveDuplicatedEntityReferenceProperties (cognitive 51) · ×1
  • 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.
D2 · Cognitive Complexity · request (cognitive 50) · ×1
  • 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.
D2 · Cognitive Complexity · processParentheses (cognitive 49) · ×1
  • processParentheses (cognitive 49) src/core/preprocessor.js: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.
D2 · Cognitive Complexity · copyRenderTarget (cognitive 48) · ×1
  • copyRenderTarget (cognitive 48) src/platform/graphics/webgpu/webgpu-graphics-device.js:2081 — copyRenderTarget has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 12 (25 pts), if/else 9 (17 pts), boolean chains 3, other 3 (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.
D2 · Cognitive Complexity · renderForwardInternal (cognitive 48) · ×1
  • renderForwardInternal (cognitive 48) src/scene/renderer/forward-renderer.js:281 — 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.
D2 · Cognitive Complexity · ParticleSystemComponentSystem.onUpdate (cognitive 47) · ×1
  • 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.
D2 · Cognitive Complexity · MaterialHandler._bindAndAssignAssets (cognitive 47) · ×1
  • MaterialHandler._bindAndAssignAssets (cognitive 47) src/framework/handlers/material.js:173 — 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.
D2 · Cognitive Complexity · createImages (cognitive 47) · ×1
  • createImages (cognitive 47) src/framework/parsers/glb-parser.js:1358 — 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 (getGammaTextures::(anonymous), (anonymous)::(anonymous), loadTexture::(anonymous)::continuation, …). 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.
D2 · Cognitive Complexity · ShadowRendererDirectional.cull (cognitive 46) · ×1
  • ShadowRendererDirectional.cull (cognitive 46) src/scene/renderer/shadow-renderer-directional.js:100 — 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.
D2 · Cognitive Complexity · DdsParser.open (cognitive 46) · ×1
  • 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.
D2 · Cognitive Complexity · _updateWorldState (cognitive 46) · ×1
  • _updateWorldState (cognitive 46) src/scene/gsplat-unified/gsplat-world.js:609 — _updateWorldState has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 9 (17 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 20). Of this number, 34 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameGraph._compilePasses (cognitive 45) · ×1
  • FrameGraph._compilePasses (cognitive 45) src/scene/frame-graph.js:120 — FrameGraph._compilePasses has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 5 (11 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · draco-worker.DracoWorker (cognitive 45) · ×1
  • draco-worker.DracoWorker (cognitive 45) src/framework/parsers/draco-worker.js:1 — draco-worker.DracoWorker has cognitive complexity 45 (threshold 15). Drivers by points: loops 11 (21 pts), if/else 9 (11 pts), boolean chains 6, match/switch 4, ternaries 1 (3 pts) (nesting depth added 14). Most of this is not in the body itself: 2 of the 45 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 137, 282, 70, …). 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 · updateStateFromTransition (cognitive 45) · ×1
  • updateStateFromTransition (cognitive 45) src/framework/anim/controller/anim-controller.js:422 — updateStateFromTransition has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (28 pts), ternaries 4 (9 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RigidBodyComponentSystem._cleanOldCollisions (cognitive 44) · ×1
  • 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.
D2 · Cognitive Complexity · WebglGraphicsDevice.endRenderPass (cognitive 44) · ×1
  • WebglGraphicsDevice.endRenderPass (cognitive 44) src/platform/graphics/webgl/webgl-graphics-device.js:1603 — 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.
D2 · Cognitive Complexity · TextureAtlasHandler.patch (cognitive 44) · ×1
  • TextureAtlasHandler.patch (cognitive 44) src/framework/handlers/texture-atlas.js:110 — TextureAtlasHandler.patch has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 44) · ×1
  • constructor (cognitive 44) src/platform/graphics/texture.js:294 — constructor has cognitive complexity 44 (threshold 15). Drivers by points: other 23, if/else 9 (10 pts), boolean chains 7, ternaries 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · renderForwardLayer (cognitive 44) · ×1
  • renderForwardLayer (cognitive 44) src/scene/renderer/forward-renderer.js:485 — renderForwardLayer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 3 (10 pts), other 8, boolean chains 4 (nesting depth added 17). Of this number, 26 points are the body's own statements and 18 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _logRenderActions (cognitive 44) · ×1
  • _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.
D2 · Cognitive Complexity · BatchManager.prepare (cognitive 43) · ×1
  • BatchManager.prepare (cognitive 43) src/scene/batching/batch-manager.js:474 — 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.
D2 · Cognitive Complexity · constructor (cognitive 42) · ×1
  • constructor (cognitive 42) src/platform/graphics/webgl/webgl-graphics-device.js:227 — 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.
D2 · Cognitive Complexity · setupForRenderPass (cognitive 42) · ×1
  • setupForRenderPass (cognitive 42) src/platform/graphics/webgpu/webgpu-render-target.js:578 — 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.
D2 · Cognitive Complexity · assignSplatOffsets (cognitive 42) · ×1
  • assignSplatOffsets (cognitive 42) src/scene/gsplat-unified/gsplat-world-state.js:266 — assignSplatOffsets has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 3 (9 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · HdrParser._readPixels (cognitive 41) · ×1
  • 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.
D2 · Cognitive Complexity · EventHandler.off (cognitive 39) · ×1
  • EventHandler.off (cognitive 39) src/core/event-handler.js:167 — 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.
D2 · Cognitive Complexity · Mesh.update (cognitive 39) · ×1
  • Mesh.update (cognitive 39) src/scene/mesh.js:922 — 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.
D2 · Cognitive Complexity · Skeleton.addTime (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · _allocate (cognitive 39) · ×1
  • _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.
D2 · Cognitive Complexity · GSplatLodTable.constructor (cognitive 38) · ×1
  • GSplatLodTable.constructor (cognitive 38) src/scene/gsplat-unified/gsplat-lod-table.js:101 — GSplatLodTable.constructor has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 5 (14 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GSplatWorkBufferRenderPass.update (cognitive 38) · ×1
  • GSplatWorkBufferRenderPass.update (cognitive 38) src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js:127 — 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.
D2 · Cognitive Complexity · Lightmapper.collectModels (cognitive 38) · ×1
  • Lightmapper.collectModels (cognitive 38) src/framework/lightmapper/lightmapper.js:309 — Lightmapper.collectModels has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · khr-lights-punctual.createLights (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · createMaterial (cognitive 38) · ×1
  • createMaterial (cognitive 38) src/framework/parsers/glb-parser.js:531 — 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.
D2 · Cognitive Complexity · update (cognitive 38) · ×1
  • update (cognitive 38) src/scene/gsplat-unified/gsplat-world.js:462 — 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.
D2 · Cognitive Complexity · GSplatOctreeInstance.update (cognitive 37) · ×1
  • GSplatOctreeInstance.update (cognitive 37) src/scene/gsplat-unified/gsplat-octree-instance.js:921 — GSplatOctreeInstance.update has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (14 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GSplatBudgetBalancer._accumulate (cognitive 37) · ×1
  • GSplatBudgetBalancer._accumulate (cognitive 37) src/scene/gsplat-unified/gsplat-budget-balancer.js:219 — GSplatBudgetBalancer._accumulate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (15 pts), ternaries 4 (15 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · khr-draco-mesh-compression.createDracoMesh (cognitive 37) · ×1
  • 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.
D2 · Cognitive Complexity · rebuild (cognitive 37) · ×1
  • 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.
D2 · Cognitive Complexity · MeshInstance.aabb (cognitive 36) · ×1
  • MeshInstance.aabb (cognitive 36) src/scene/mesh-instance.js:827 — 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.
D2 · Cognitive Complexity · glb-parser.createMesh (cognitive 36) · ×1
  • glb-parser.createMesh (cognitive 36) src/framework/parsers/glb-parser.js:418 — 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). Most of this is not in the body itself: 0 of the 36 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 422, 488). 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 · CubemapHandler.loadAssets (cognitive 36) · ×1
  • 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 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.
D2 · Cognitive Complexity · reprojectTexture (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · XrManipulation.update (cognitive 35) · ×1
  • XrManipulation.update (cognitive 35) scripts/esm/xr/xr-manipulation.mjs:552 — XrManipulation.update has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 9, loops 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnimStateGraph.constructor (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · ElementComponent._sync (cognitive 35) · ×1
  • ElementComponent._sync (cognitive 35) src/framework/components/element/component.js:2218 — 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.
D2 · Cognitive Complexity · WebglGraphicsDevice.copyRenderTarget (cognitive 35) · ×1
  • WebglGraphicsDevice.copyRenderTarget (cognitive 35) src/platform/graphics/webgl/webgl-graphics-device.js:1321 — 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.
D2 · Cognitive Complexity · AnimEvaluator.update (cognitive 35) · ×1
  • AnimEvaluator.update (cognitive 35) src/framework/anim/evaluator/anim-evaluator.js:203 — AnimEvaluator.update has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphNode._sync (cognitive 34) · ×1
  • GraphNode._sync (cognitive 34) src/scene/graph-node.js:1550 — GraphNode._sync has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 1 (5 pts), boolean chains 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GSplatWorld.cleanupOldWorldStates (cognitive 34) · ×1
  • GSplatWorld.cleanupOldWorldStates (cognitive 34) src/scene/gsplat-unified/gsplat-world.js:898 — 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.
D2 · Cognitive Complexity · AnimationComponent.update (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · startRenderPass (cognitive 34) · ×1
  • startRenderPass (cognitive 34) src/platform/graphics/webgl/webgl-graphics-device.js:1490 — 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.
D2 · Cognitive Complexity · update (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · XrMenu._updateRayInteraction (cognitive 33) · ×1
  • XrMenu._updateRayInteraction (cognitive 33) scripts/esm/xr/xr-menu.mjs:1548 — XrMenu._updateRayInteraction has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorldClustersDebug.render (cognitive 33) · ×1
  • WorldClustersDebug.render (cognitive 33) src/scene/lighting/world-clusters-debug.js:54 — WorldClustersDebug.render has cognitive complexity 33 (threshold 15). Drivers by points: loops 7 (17 pts), if/else 9 (16 pts) (nesting depth added 17). Of this number, 25 points are the body's own statements and 8 belong to one function 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.
D2 · Cognitive Complexity · Culler.updateLightVisibility (cognitive 33) · ×1
  • Culler.updateLightVisibility (cognitive 33) src/scene/renderer/culler.js:342 — 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.
D2 · Cognitive Complexity · GSplatComponent.castShadows (cognitive 33) · ×1
  • GSplatComponent.castShadows (cognitive 33) src/framework/components/gsplat/component.js:331 — GSplatComponent.castShadows has cognitive complexity 33 (threshold 15). Drivers by points: loops 4 (16 pts), if/else 7 (15 pts), boolean chains 2 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · EventHandler.fire (cognitive 32) · ×1
  • EventHandler.fire (cognitive 32) src/core/event-handler.js:287 — EventHandler.fire has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 4, ternaries 1 (3 pts), loops 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.
D2 · Cognitive Complexity · LightTextureAtlas.subdivide (cognitive 32) · ×1
  • 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 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.
D2 · Cognitive Complexity · RenderComponent.castShadows (cognitive 32) · ×1
  • RenderComponent.castShadows (cognitive 32) src/framework/components/render/component.js:410 — 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.
D2 · Cognitive Complexity · ScriptComponent.scripts (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · AnimEvaluator.addClip (cognitive 32) · ×1
  • AnimEvaluator.addClip (cognitive 32) src/framework/anim/evaluator/anim-evaluator.js:43 — AnimEvaluator.addClip has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · entity.resolveDuplicatedEntityReferenceProperties (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · computeDistanceRange (cognitive 32) · ×1
  • computeDistanceRange (cognitive 32) src/scene/gsplat-unified/gsplat-hybrid-renderer.js:633 — 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.
D2 · Cognitive Complexity · SpriteAnimationClip.sprite (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · ScriptRegistry.add (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · ShadowRenderer.submitCasters (cognitive 31) · ×1
  • ShadowRenderer.submitCasters (cognitive 31) src/scene/renderer/shadow-renderer.js:563 — 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.
D2 · Cognitive Complexity · attachTexture (cognitive 31) · ×1
  • attachTexture (cognitive 31) src/extras/exporters/gltf-exporter.js:350 — 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 · ShaderGeneratorStandard._addMapDefines (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · Renderer.setCameraUniforms (cognitive 30) · ×1
  • Renderer.setCameraUniforms (cognitive 30) src/scene/renderer/renderer.js:468 — Renderer.setCameraUniforms has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 11 (17 pts), if/else 7 (12 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GltfAccessor.getData (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · XrHand.update (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · ElementInput._onElementSelectEvent (cognitive 30) · ×1
  • ElementInput._onElementSelectEvent (cognitive 30) src/framework/input/element-input.js:837 — ElementInput._onElementSelectEvent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _validateCopy (cognitive 30) · ×1
  • _validateCopy (cognitive 30) src/platform/graphics/texture.js:1482 — _validateCopy has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (12 pts), other 9, boolean chains 7, ternaries 2 (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.
D2 · Cognitive Complexity · constructor · ×1
  • constructor::read (cognitive 30) src/scene/gsplat/gsplat-sog-data.js:64 — constructor::read has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 4 (14 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GSplatMesh.buildFromEntity (cognitive 29) · ×1
  • GSplatMesh.buildFromEntity (cognitive 29) scripts/esm/gsplat/gsplat-mesh.mjs:297 — GSplatMesh.buildFromEntity has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (11 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tags._processArguments (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · markup.resolveMarkupTags (cognitive 29) · ×1
  • 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). To reduce it, split the body into named stages: move each independent 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 · ModelComponent.mapping (cognitive 29) · ×1
  • ModelComponent.mapping (cognitive 29) src/framework/components/model/component.js:728 — 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.
D2 · Cognitive Complexity · texture._completePartialMipmapChain (cognitive 29) · ×1
  • 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 literals inside it that branch (lines 121, 105). 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 · AppBase._parseApplicationProperties (cognitive 29) · ×1
  • AppBase._parseApplicationProperties (cognitive 29) src/framework/app-base.js:858 — 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.
D2 · Cognitive Complexity · _setupLight (cognitive 29) · ×1
  • _setupLight (cognitive 29) src/extras/render-passes/frame-pass-volumetric-fog.js:465 — _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.
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.
D2 · Cognitive Complexity · GSplatWorld.applyWorkBufferUpdates (cognitive 28) · ×1
  • GSplatWorld.applyWorkBufferUpdates (cognitive 28) src/scene/gsplat-unified/gsplat-world.js:956 — 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 969). 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.
D2 · Cognitive Complexity · khr-gaussian-splatting.createGSplatData (cognitive 28) · ×1
  • 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 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.
D2 · Cognitive Complexity · ModelComponent.onEnable (cognitive 28) · ×1
  • ModelComponent.onEnable (cognitive 28) src/framework/components/model/component.js:981 — 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.
D2 · Cognitive Complexity · ParticleSystemComponentSystem.initializeComponentData (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · BatchManager.collectBatchedMeshData (cognitive 28) · ×1
  • BatchManager.collectBatchedMeshData (cognitive 28) src/scene/batching/batch-manager.js:597 — 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.
D2 · Cognitive Complexity · glb-parser.createCameras (cognitive 28) · ×1
  • glb-parser.createCameras (cognitive 28) src/framework/parsers/glb-parser.js:1190 — 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 1200). 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.
D2 · Cognitive Complexity · basis.prepareWorkerModules (cognitive 28) · ×1
  • 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 literals inside it that branch (lines 35, 68, 86, …). 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 · MiniStats.postRender (cognitive 28) · ×1
  • MiniStats.postRender (cognitive 28) src/extras/mini-stats/mini-stats.js:959 — 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.
D2 · Cognitive Complexity · TextureRenderer.draw (cognitive 28) · ×1
  • TextureRenderer.draw (cognitive 28) src/extras/renderers/texture-renderer.js:220 — 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.
D2 · Cognitive Complexity · RenderPassPicker.execute (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · update (cognitive 28) · ×1
  • update (cognitive 28) src/extras/mini-stats/mini-stats.js:722 — 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.
D2 · Cognitive Complexity · Water._frameUpdate (cognitive 27) · ×1
  • Water._frameUpdate (cognitive 27) scripts/esm/water.mjs:1607 — Water._frameUpdate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 9, ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · BlockAllocator._defragIncremental (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · LightSlotUniforms.appendFormats (cognitive 27) · ×1
  • LightSlotUniforms.appendFormats (cognitive 27) src/scene/lighting/light-slot-uniforms.js:97 — 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.
D2 · Cognitive Complexity · SkinInstanceCache.removeCachedSkinInstance (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · ElementInput._getTargetElement (cognitive 27) · ×1
  • ElementInput._getTargetElement (cognitive 27) src/framework/input/element-input.js:975 — ElementInput._getTargetElement has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonStandardMaterialParser.initialize (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · Asset.file (cognitive 27) · ×1
  • Asset.file (cognitive 27) src/framework/asset/asset.js:448 — 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.
D2 · Cognitive Complexity · AnimClip._update (cognitive 26) · ×1
  • AnimClip._update (cognitive 26) src/framework/anim/evaluator/anim-clip.js:222 — AnimClip._update has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LightTextureAtlas.update (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · Renderer.collectLights (cognitive 26) · ×1
  • Renderer.collectLights (cognitive 26) src/scene/renderer/renderer.js:1238 — 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.
D2 · Cognitive Complexity · TextElement.font (cognitive 26) · ×1
  • TextElement.font (cognitive 26) src/framework/components/element/text-element.js:1855 — 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.
D2 · Cognitive Complexity · _updateMesh (cognitive 26) · ×1
  • _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.
D2 · Cognitive Complexity · evaluateNodeDistances (cognitive 26) · ×1
  • evaluateNodeDistances (cognitive 26) src/scene/gsplat-unified/gsplat-octree-instance.js:503 — evaluateNodeDistances has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (3 pts), boolean chains 2, loops 1, other 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · collectDirectionalShadowLights (cognitive 26) · ×1
  • collectDirectionalShadowLights (cognitive 26) src/scene/renderer/culler.js:289 — 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.
D2 · Cognitive Complexity · tween.Tween.initialize (cognitive 25) · ×1
  • tween.Tween.initialize (cognitive 25) scripts/animation/tween.js:121 — tween.Tween.initialize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5, boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 149, 160, 170). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · XrControllers.update (cognitive 25) · ×1
  • XrControllers.update (cognitive 25) scripts/esm/xr/xr-controllers.mjs:378 — XrControllers.update has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XrNavigation.update (cognitive 25) · ×1
  • XrNavigation.update (cognitive 25) scripts/esm/xr/xr-navigation.mjs:711 — XrNavigation.update has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BundleRegistry._onAssetRemove (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · ply.readPly (cognitive 25) · ×1
  • 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 literals inside it that branch (lines 459, 483, 544, …). 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 · WebglShader.finalize (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · Lightmapper.calculateLightmapSize (cognitive 25) · ×1
  • Lightmapper.calculateLightmapSize (cognitive 25) src/framework/lightmapper/lightmapper.js:407 — Lightmapper.calculateLightmapSize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 4 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ElementInput._onElementMouseEvent (cognitive 25) · ×1
  • ElementInput._onElementMouseEvent (cognitive 25) src/framework/input/element-input.js:719 — ElementInput._onElementMouseEvent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelHandler.patch (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · WebgpuGraphicsDevice.endRenderPass (cognitive 25) · ×1
  • WebgpuGraphicsDevice.endRenderPass (cognitive 25) src/platform/graphics/webgpu/webgpu-graphics-device.js:1667 — WebgpuGraphicsDevice.endRenderPass has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (8 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.
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.
D2 · Cognitive Complexity · processAttributes (cognitive 25) · ×1
  • 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). Most of this is not in the body itself: 0 of the 25 points are its own statements and the rest belongs 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.
D2 · Cognitive Complexity · createDefinition (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · orbit-camera.OrbitCamera._buildAabb (cognitive 24) · ×1
  • orbit-camera.OrbitCamera._buildAabb (cognitive 24) scripts/camera/orbit-camera.js:294 — orbit-camera.OrbitCamera._buildAabb has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 7 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VertexFormat.constructor (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Culler.cullLights (cognitive 24) · ×1
  • Culler.cullLights (cognitive 24) src/scene/renderer/culler.js:151 — 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.
D2 · Cognitive Complexity · Parser._parseTag (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · ModelComponent.castShadows (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · ShaderProcessorGLSL.processUniforms (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · WebglGraphicsDevice.createVertexArray (cognitive 24) · ×1
  • WebglGraphicsDevice.createVertexArray (cognitive 24) src/platform/graphics/webgl/webgl-graphics-device.js:1993 — WebglGraphicsDevice.createVertexArray has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (5 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.
D2 · Cognitive Complexity · WebglGraphicsDevice.setDepthState (cognitive 24) · ×1
  • WebglGraphicsDevice.setDepthState (cognitive 24) src/platform/graphics/webgl/webgl-graphics-device.js:3047 — 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.
D2 · Cognitive Complexity · Controller.isPressed (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Controller.wasPressed (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · onEnable (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · addTime (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · constructor (cognitive 24) · ×1
  • 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 207, 221, 201, …). 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 · initGraphs (cognitive 24) · ×1
  • initGraphs (cognitive 24) src/extras/mini-stats/mini-stats.js:568 — initGraphs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (7 pts), loops 3, boolean chains 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.
D2 · Cognitive Complexity · initDepthStencil (cognitive 24) · ×1
  • initDepthStencil (cognitive 24) src/platform/graphics/webgpu/webgpu-render-target.js:315 — initDepthStencil has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 1 (5 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.
D2 · Cognitive Complexity · _findTransition (cognitive 24) · ×1
  • _findTransition (cognitive 24) src/framework/anim/controller/anim-controller.js:342 — _findTransition has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 8). Of this number, 12 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _updateEnvOptions (cognitive 24) · ×1
  • _updateEnvOptions (cognitive 24) src/scene/materials/standard-material-options-builder.js:301 — _updateEnvOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, ternaries 3 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · renderLayerRenderStep (cognitive 24) · ×1
  • renderLayerRenderStep (cognitive 24) src/scene/renderer/render-pass-forward.js:346 — renderLayerRenderStep has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, other 2, ternaries 2 (nesting depth added 8). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · load (cognitive 24) · ×1
  • load (cognitive 24) src/framework/parsers/sog-bundle.js:188 — load has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 2, loops 2, other 1, ternaries 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 4 belong to 12 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · gsplat-mesh.rasterizeTriangle (cognitive 23) · ×1
  • gsplat-mesh.rasterizeTriangle (cognitive 23) scripts/esm/gsplat/gsplat-mesh.mjs:34 — gsplat-mesh.rasterizeTriangle has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 7 (9 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vat-converter.sampleAnimations (cognitive 23) · ×1
  • vat-converter.sampleAnimations (cognitive 23) scripts/esm/vat/vat-converter.mjs:180 — vat-converter.sampleAnimations has cognitive complexity 23 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 3 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 10). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 231). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · XrMenu._checkFingerTouch (cognitive 23) · ×1
  • XrMenu._checkFingerTouch (cognitive 23) scripts/esm/xr/xr-menu.mjs:1333 — XrMenu._checkFingerTouch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XrMenu.update (cognitive 23) · ×1
  • XrMenu.update (cognitive 23) scripts/esm/xr/xr-menu.mjs:1439 — XrMenu.update has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StandardMaterialMapTransforms.collectUnapplied (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · VertexIterator.writeData (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · VertexIterator.readData (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · Morph._initTextureBased (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · Renderer.updateShaders (cognitive 23) · ×1
  • Renderer.updateShaders (cognitive 23) src/scene/renderer/renderer.js:1304 — 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.
D2 · Cognitive Complexity · WebglGraphicsDevice.activateShader (cognitive 23) · ×1
  • WebglGraphicsDevice.activateShader (cognitive 23) src/platform/graphics/webgl/webgl-graphics-device.js:3152 — 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.
D2 · Cognitive Complexity · SpriteComponent._showFrame (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · generateWireframe (cognitive 23) · ×1
  • generateWireframe (cognitive 23) src/scene/mesh.js:1102 — 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.
D2 · Cognitive Complexity · createPrimitive (cognitive 23) · ×1
  • createPrimitive (cognitive 23) src/extras/exporters/gltf-exporter.js:757 — 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 767, 778, 777, …). 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 · collectAttributes (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · updateClusters (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · Frustum.add (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · ply.readCompressedPly (cognitive 22) · ×1
  • 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 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.
D2 · Cognitive Complexity · GSplatProjector.dispatch (cognitive 22) · ×1
  • GSplatProjector.dispatch (cognitive 22) src/scene/gsplat-unified/gsplat-projector.js:646 — GSplatProjector.dispatch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 2 (3 pts), ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GSplatShadowRenderer._cullEntry (cognitive 22) · ×1
  • GSplatShadowRenderer._cullEntry (cognitive 22) src/scene/gsplat-unified/gsplat-shadow-renderer.js:548 — GSplatShadowRenderer._cullEntry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, loops 2 (3 pts), ternaries 2 (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.
D2 · Cognitive Complexity · Atlas.upload (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · WebglGraphicsDevice.setTextureParameters (cognitive 22) · ×1
  • WebglGraphicsDevice.setTextureParameters (cognitive 22) src/platform/graphics/webgl/webgl-graphics-device.js:1865 — 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.
D2 · Cognitive Complexity · WebglGraphicsDevice.setBlendState (cognitive 22) · ×1
  • WebglGraphicsDevice.setBlendState (cognitive 22) src/platform/graphics/webgl/webgl-graphics-device.js:2955 — 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.
D2 · Cognitive Complexity · Lightmapper.renderShadowMap (cognitive 22) · ×1
  • Lightmapper.renderShadowMap (cognitive 22) src/framework/lightmapper/lightmapper.js:832 — Lightmapper.renderShadowMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BatchManager.generate (cognitive 22) · ×1
  • BatchManager.generate (cognitive 22) src/scene/batching/batch-manager.js:394 — 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.
D2 · Cognitive Complexity · SpriteComponent.clips (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · SpriteComponentSystem.initializeComponentData (cognitive 22) · ×1
  • SpriteComponentSystem.initializeComponentData (cognitive 22) src/framework/components/sprite/system.js:152 — SpriteComponentSystem.initializeComponentData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · glb-parser.createVertexBufferInternal (cognitive 22) · ×1
  • glb-parser.createVertexBufferInternal (cognitive 22) src/framework/parsers/glb-parser.js:221 — 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.
D2 · Cognitive Complexity · clear (cognitive 22) · ×1
  • clear (cognitive 22) src/platform/graphics/webgl/webgl-graphics-device.js:2383 — 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.
D2 · Cognitive Complexity · _parseAssets (cognitive 22) · ×1
  • _parseAssets (cognitive 22) src/framework/app-base.js:1001 — _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.
D2 · Cognitive Complexity · _createProjectorCompute (cognitive 22) · ×1
  • _createProjectorCompute (cognitive 22) src/scene/gsplat-unified/gsplat-projector.js:403 — _createProjectorCompute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 7, other 3, boolean chains 1 (nesting depth added 1). Of this number, 19 points are the body's own statements and 3 belong to 12 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · onEnable (cognitive 22) · ×1
  • onEnable (cognitive 22) src/framework/components/collision/component.js:807 — onEnable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cullMeshInstances (cognitive 22) · ×1
  • cullMeshInstances (cognitive 22) src/scene/renderer/culler.js:98 — cullMeshInstances has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (14 pts), ternaries 2 (5 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · get (cognitive 22) · ×1
  • get (cognitive 22) src/platform/graphics/webgpu/webgpu-render-pipeline.js:202 — get has cognitive complexity 22 (threshold 15). Drivers by points: other 7, if/else 4 (6 pts), ternaries 6, loops 2 (3 pts) (nesting depth added 3). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · resolve (cognitive 22) · ×1
  • resolve (cognitive 22) src/platform/graphics/webgl/webgl-render-target.js:456 — 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.
D2 · Cognitive Complexity · enable (cognitive 22) · ×1
  • enable (cognitive 22) src/framework/components/camera/post-effect-queue.js:282 — enable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to one function item inside it that branches (onPostprocessing). 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.
D2 · Cognitive Complexity · GSplatFlipbook.getNextFrameNumberFromLast (cognitive 21) · ×1
  • GSplatFlipbook.getNextFrameNumberFromLast (cognitive 21) scripts/esm/gsplat/gsplat-flipbook.mjs:322 — GSplatFlipbook.getNextFrameNumberFromLast has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GSplatText._rebuildFromText (cognitive 21) · ×1
  • GSplatText._rebuildFromText (cognitive 21) scripts/esm/gsplat/gsplat-text.mjs:131 — GSplatText._rebuildFromText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 3 (4 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlockAllocator._findFreeBlock (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · BoundingBox.computeMinMax (cognitive 21) · ×1
  • BoundingBox.computeMinMax (cognitive 21) src/core/shape/bounding-box.js:438 — BoundingBox.computeMinMax has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightSlotUniforms._dispatchDirectional (cognitive 21) · ×1
  • LightSlotUniforms._dispatchDirectional (cognitive 21) src/scene/lighting/light-slot-uniforms.js:195 — LightSlotUniforms._dispatchDirectional has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (8 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 12). Of this number, 18 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.
D2 · Cognitive Complexity · GSplatManager.update (cognitive 21) · ×1
  • GSplatManager.update (cognitive 21) src/scene/gsplat-unified/gsplat-manager.js:649 — GSplatManager.update has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1, ternaries 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderPassForward.updateClears (cognitive 21) · ×1
  • RenderPassForward.updateClears (cognitive 21) src/scene/renderer/render-pass-forward.js:203 — 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.
D2 · Cognitive Complexity · CameraComponentSystem.initializeComponentData (cognitive 21) · ×1
  • CameraComponentSystem.initializeComponentData (cognitive 21) src/framework/components/camera/system.js:102 — 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.
D2 · Cognitive Complexity · RenderComponent.materialAssets (cognitive 21) · ×1
  • RenderComponent.materialAssets (cognitive 21) src/framework/components/render/component.js:673 — 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.
D2 · Cognitive Complexity · XrInputSource.update (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · TextureHandler._getTextureOptions (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · AnimController._transitionHasConditionsMet (cognitive 21) · ×1
  • AnimController._transitionHasConditionsMet (cognitive 21) src/framework/anim/controller/anim-controller.js:313 — AnimController._transitionHasConditionsMet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnimationComponent.assets (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · createNodes (cognitive 21) · ×1
  • createNodes (cognitive 21) src/framework/parsers/glb-parser.js:1120 — 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.
D2 · Cognitive Complexity · loadBuffers (cognitive 21) · ×1
  • loadBuffers (cognitive 21) src/framework/parsers/glb-parser.js:1574 — loadBuffers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 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 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1606, 1583, 1592, …). 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 · buildResourceFormats (cognitive 21) · ×1
  • buildResourceFormats (cognitive 21) src/platform/graphics/webgpu/webgpu-shader-processor-wgsl.js:827 — 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.
D2 · Cognitive Complexity · _resolveEntityScriptAttribute (cognitive 21) · ×1
  • _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.
D2 · Cognitive Complexity · writeNodes (cognitive 21) · ×1
  • writeNodes (cognitive 21) src/extras/exporters/gltf-exporter.js:678 — 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 680, 708, 722). 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 · removeEffect (cognitive 21) · ×1
  • removeEffect (cognitive 21) src/framework/components/camera/post-effect-queue.js:177 — removeEffect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (3 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.
D2 · Cognitive Complexity · BindGroup._revalidate (cognitive 20) · ×1
  • BindGroup._revalidate (cognitive 20) src/platform/graphics/bind-group.js:346 — 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.
D2 · Cognitive Complexity · StandardMaterialMapTransforms.update (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · MeshInstance.getMaterialBindGroup (cognitive 20) · ×1
  • MeshInstance.getMaterialBindGroup (cognitive 20) src/scene/mesh-instance.js:1749 — 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.
D2 · Cognitive Complexity · WebglGraphicsDevice._multiDrawLoopFallback (cognitive 20) · ×1
  • WebglGraphicsDevice._multiDrawLoopFallback (cognitive 20) src/platform/graphics/webgl/webgl-graphics-device.js:2112 — 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.
D2 · Cognitive Complexity · basis.basisInitialize (cognitive 20) · ×1
  • basis.basisInitialize (cognitive 20) src/framework/handlers/basis.js:268 — 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.
D2 · Cognitive Complexity · TextureAtlasHandler._onAssetChange (cognitive 20) · ×1
  • TextureAtlasHandler._onAssetChange (cognitive 20) src/framework/handlers/texture-atlas.js:186 — TextureAtlasHandler._onAssetChange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ScriptAttributes.add (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · WireRenderer._writePoints (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · initFromGpuDevice (cognitive 20) · ×1
  • initFromGpuDevice (cognitive 20) src/platform/graphics/webgpu/webgpu-graphics-device.js:765 — initFromGpuDevice has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9, boolean chains 4, if/else 3 (4 pts), other 3 (nesting depth added 1). Of this number, 19 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.
D2 · Cognitive Complexity · init (cognitive 20) · ×1
  • init (cognitive 20) src/framework/app-base.js:567 — 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.
D2 · Cognitive Complexity · getRenderableHdrFormat (cognitive 20) · ×1
  • getRenderableHdrFormat (cognitive 20) src/platform/graphics/graphics-device.js:1905 — 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.
D2 · Cognitive Complexity · applySettings (cognitive 20) · ×1
  • applySettings (cognitive 20) src/scene/gsplat-unified/gsplat-params.js:1097 — 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.
D2 · Cognitive Complexity · getSampler (cognitive 20) · ×1
  • getSampler (cognitive 20) src/platform/graphics/webgpu/webgpu-texture.js:264 — getSampler has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, 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.
D2 · Cognitive Complexity · _execute (cognitive 20) · ×1
  • _execute (cognitive 20) src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:455 — _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.
D2 · Cognitive Complexity · load (cognitive 20) · ×1
  • load (cognitive 20) src/framework/parsers/ply.js:591 — load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), other 4, ternaries 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 6). 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 into named stages: move each independent 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 · getRenderInfo (cognitive 20) · ×1
  • getRenderInfo (cognitive 20) src/scene/gsplat-unified/gsplat-work-buffer.js:239 — 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.
D2 · Cognitive Complexity · _intersectsRay (cognitive 20) · ×1
  • _intersectsRay (cognitive 20) src/core/shape/bounding-box.js:185 — _intersectsRay has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnnotationManager.initialize (cognitive 19) · ×1
  • AnnotationManager.initialize (cognitive 19) scripts/esm/annotations.mjs:812 — AnnotationManager.initialize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 889, 918, 825, …). 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 · Tags._has (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · GraphicsDevice.initCapsDefines (cognitive 19) · ×1
  • GraphicsDevice.initCapsDefines (cognitive 19) src/platform/graphics/graphics-device.js:840 — 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.
D2 · Cognitive Complexity · ply.readGeneralPly (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · ComponentSystem.initializeComponentData (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · ModelComponent.model (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · XrView._updateDepth (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · XrManager.update (cognitive 19) · ×1
  • XrManager.update (cognitive 19) src/framework/xr/xr-manager.js:1022 — 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.
D2 · Cognitive Complexity · ext-mesh-gpu-instancing.createInstancing (cognitive 19) · ×1
  • 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). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs 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.
D2 · Cognitive Complexity · GlbContainerResource.createModel (cognitive 19) · ×1
  • 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 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.
D2 · Cognitive Complexity · UsdzExporter.buildMaterial (cognitive 19) · ×1
  • 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 literal inside it that branches (line 470). 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.
D2 · Cognitive Complexity · RotateGizmo._drag (cognitive 19) · ×1
  • RotateGizmo._drag (cognitive 19) src/extras/gizmo/rotate-gizmo.js:566 — 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.
D2 · Cognitive Complexity · OutlineRenderer.getMeshInstances (cognitive 19) · ×1
  • OutlineRenderer.getMeshInstances (cognitive 19) src/extras/renderers/outline-renderer.js:293 — 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.
D2 · Cognitive Complexity · graphics-device-create.createGraphicsDevice (cognitive 19) · ×1
  • graphics-device-create.createGraphicsDevice (cognitive 19) src/platform/graphics/graphics-device-create.js:92 — 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.
D2 · Cognitive Complexity · layers (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · GSplatImage._rebuildFromImage (cognitive 18) · ×1
  • GSplatImage._rebuildFromImage (cognitive 18) scripts/esm/gsplat/gsplat-image.mjs:89 — GSplatImage._rebuildFromImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GSplatLines.postUpdate (cognitive 18) · ×1
  • GSplatLines.postUpdate (cognitive 18) scripts/esm/gsplat/gsplat-lines.mjs:333 — GSplatLines.postUpdate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (7 pts), ternaries 1 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightsBuffer.addLightData (cognitive 18) · ×1
  • LightsBuffer.addLightData (cognitive 18) src/scene/lighting/lights-buffer.js:194 — LightsBuffer.addLightData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WebglShader.link (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · BatchManager._collectAndRemoveMeshInstances (cognitive 18) · ×1
  • BatchManager._collectAndRemoveMeshInstances (cognitive 18) src/scene/batching/batch-manager.js:355 — 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.
D2 · Cognitive Complexity · JobQueue.init (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · AnimComponent.loadAnimationAssets (cognitive 18) · ×1
  • AnimComponent.loadAnimationAssets (cognitive 18) src/framework/components/anim/component.js:480 — 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.
D2 · Cognitive Complexity · WebgpuXrBridge.beginFrame (cognitive 18) · ×1
  • WebgpuXrBridge.beginFrame (cognitive 18) src/platform/graphics/webgpu/webgpu-xr-bridge.js:58 — WebgpuXrBridge.beginFrame has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (5 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.
D2 · Cognitive Complexity · WebgpuGraphicsDevice.createDevice (cognitive 18) · ×1
  • WebgpuGraphicsDevice.createDevice (cognitive 18) src/platform/graphics/webgpu/webgpu-graphics-device.js:628 — 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.
D2 · Cognitive Complexity · readTextureAsync (cognitive 18) · ×1
  • readTextureAsync (cognitive 18) src/platform/graphics/webgl/webgl-graphics-device.js:2607 — readTextureAsync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6, loops 2 (5 pts), other 5, error handling 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch ((anonymous)::(anonymous), (anonymous), release, …). 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.
D2 · Cognitive Complexity · frameStart (cognitive 18) · ×1
  • frameStart (cognitive 18) src/platform/graphics/graphics-device.js:1780 — 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). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to 7 function items inside it that branch ((anonymous)::(anonymous), (anonymous)::(anonymous), (anonymous), …). 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.
D2 · Cognitive Complexity · createBufferViews (cognitive 18) · ×1
  • createBufferViews (cognitive 18) src/framework/parsers/glb-parser.js:1761 — createBufferViews has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). Of this number, 11 points are the body's own statements and 7 belong to 7 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.
D2 · Cognitive Complexity · renderForwardPrepareMaterials (cognitive 18) · ×1
  • renderForwardPrepareMaterials (cognitive 18) src/scene/renderer/forward-renderer.js:203 — 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.
D2 · Cognitive Complexity · createCalculator · ×1
  • createCalculator::calculateSizesOnAxisB (cognitive 18) src/framework/components/layout-group/layout-calculator.js:202 — 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.
D2 · Cognitive Complexity · _updateTexOptions (cognitive 18) · ×1
  • _updateTexOptions (cognitive 18) src/scene/materials/standard-material-options-builder.js:145 — _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.
D2 · Cognitive Complexity · _updateMaterialOptions (cognitive 18) · ×1
  • _updateMaterialOptions (cognitive 18) src/scene/materials/standard-material-options-builder.js:219 — _updateMaterialOptions has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 17, ternaries 1. Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GSplatVaryings._generateChunks (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · GSplatOctree.flushRequests (cognitive 17) · ×1
  • GSplatOctree.flushRequests (cognitive 17) src/scene/gsplat-unified/gsplat-octree.js:629 — GSplatOctree.flushRequests has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GSplatWorld.reconcile (cognitive 17) · ×1
  • GSplatWorld.reconcile (cognitive 17) src/scene/gsplat-unified/gsplat-world.js:391 — 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.
D2 · Cognitive Complexity · GSplatLayerData.updateConfiguration (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · ammo-physics-shape.getTriMesh (cognitive 17) · ×1
  • 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 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.
D2 · Cognitive Complexity · MouseEvent.constructor (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · draco-decoder.initializeWorkers (cognitive 17) · ×1
  • draco-decoder.initializeWorkers (cognitive 17) src/framework/parsers/draco-decoder.js:171 — draco-decoder.initializeWorkers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 11 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.
D2 · Cognitive Complexity · GltfExporter.collectResources (cognitive 17) · ×1
  • GltfExporter.collectResources (cognitive 17) src/extras/exporters/gltf-exporter.js:147 — GltfExporter.collectResources has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 173, 223, 181). 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 · usdz-exporter.skinVertices (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · Gizmo._getSelection (cognitive 17) · ×1
  • Gizmo._getSelection (cognitive 17) src/extras/gizmo/gizmo.js:614 — Gizmo._getSelection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). 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, split the body into named stages: move each independent 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 · outlineColor (cognitive 17) · ×1
  • outlineColor (cognitive 17) src/framework/components/element/text-element.js:2056 — 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.
D2 · Cognitive Complexity · _prepareUniformBuffer (cognitive 17) · ×1
  • _prepareUniformBuffer (cognitive 17) src/scene/materials/material.js:1223 — _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.
D2 · Cognitive Complexity · writeMaterials (cognitive 17) · ×1
  • writeMaterials (cognitive 17) src/extras/exporters/gltf-exporter.js:636 — 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 639). 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.
D2 · Cognitive Complexity · updateSubStat (cognitive 17) · ×1
  • updateSubStat (cognitive 17) src/extras/mini-stats/mini-stats.js:922 — 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.
D2 · Cognitive Complexity · _writeLine (cognitive 17) · ×1
  • _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.
D2 · Cognitive Complexity · load · ×1
  • load::_opened (cognitive 17) src/framework/asset/asset-registry.js:482 — 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.
D2 · Cognitive Complexity · sort (cognitive 17) · ×1
  • sort (cognitive 17) src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:453 — 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.
D2 · Cognitive Complexity · sortIndirect (cognitive 17) · ×1
  • sortIndirect (cognitive 17) src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:576 — 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.
D2 · Cognitive Complexity · stripUnusedColorAttachments (cognitive 17) · ×1
  • stripUnusedColorAttachments (cognitive 17) src/core/preprocessor.js: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.
D2 · Cognitive Complexity · initColor (cognitive 17) · ×1
  • initColor (cognitive 17) src/platform/graphics/webgpu/webgpu-render-target.js:460 — initColor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (4 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · calcSpawnPosition (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · createShader (cognitive 17) · ×1
  • createShader (cognitive 17) src/scene/shader-lib/shader-utils.js:93 — createShader has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 4, if/else 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · applyAllocations (cognitive 17) · ×1
  • applyAllocations (cognitive 17) src/scene/gsplat-unified/gsplat-world-state.js:214 — applyAllocations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (5 pts), boolean chains 2, ternaries 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.
D2 · Cognitive Complexity · GSplatTrees._rebuild (cognitive 16) · ×1
  • GSplatTrees._rebuild (cognitive 16) scripts/esm/gsplat/gsplat-trees.mjs:348 — GSplatTrees._rebuild has cognitive complexity 16 (threshold 15). Drivers by points: loops 9 (13 pts), if/else 2, boolean chains 1 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · XrNavigation._computeArcHit (cognitive 16) · ×1
  • XrNavigation._computeArcHit (cognitive 16) scripts/esm/xr/xr-navigation.mjs:604 — XrNavigation._computeArcHit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (7 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.
D2 · Cognitive Complexity · MeshInstanceStorage._uploadDirtySlots (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · StandardMaterialMapTransforms._updateIds (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · SphereGeometry.constructor (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ImageRenderable.setUnmaskDrawOrder (cognitive 16) · ×1
  • 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 literal inside it that branches (line 169). 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.
D2 · Cognitive Complexity · ImageElement.texture (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · AssetReference._bind (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · RenderComponent.rootBone (cognitive 16) · ×1
  • RenderComponent.rootBone (cognitive 16) src/framework/components/render/component.js:775 — 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.
D2 · Cognitive Complexity · WebglGpuProfiler.request (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Lightmapper.postprocessTextures (cognitive 16) · ×1
  • Lightmapper.postprocessTextures (cognitive 16) src/framework/lightmapper/lightmapper.js:883 — Lightmapper.postprocessTextures has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (8 pts), loops 3 (6 pts), boolean chains 1, if/else 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SoundComponentSystem.onUpdate (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ScriptHandler._loadModule (cognitive 16) · ×1
  • ScriptHandler._loadModule (cognitive 16) src/framework/handlers/script.js:120 — ScriptHandler._loadModule has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 135). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CoreExporter.textureToCanvas (cognitive 16) · ×1
  • CoreExporter.textureToCanvas (cognitive 16) src/extras/exporters/core-exporter.js:39 — CoreExporter.textureToCanvas has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, loops 1 (3 pts), ternaries 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 2 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.
D2 · Cognitive Complexity · RotateGizmo._setNodeRotations (cognitive 16) · ×1
  • RotateGizmo._setNodeRotations (cognitive 16) src/extras/gizmo/rotate-gizmo.js:607 — 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.
D2 · Cognitive Complexity · WordAtlas.constructor (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ResourceLine.equals (cognitive 16) · ×1
  • ResourceLine.equals (cognitive 16) src/platform/graphics/webgpu/webgpu-shader-processor-wgsl.js: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.
D2 · Cognitive Complexity · shadowColor (cognitive 16) · ×1
  • shadowColor (cognitive 16) src/framework/components/element/text-element.js:2137 — 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.
D2 · Cognitive Complexity · destroy (cognitive 16) · ×1
  • destroy (cognitive 16) src/framework/app-base.js:1811 — destroy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · update (cognitive 16) · ×1
  • update (cognitive 16) src/extras/render-passes/camera-frame.js:637 — update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 3, other 1, ternaries 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.
D2 · Cognitive Complexity · constructor (cognitive 16) · ×1
  • constructor (cognitive 16) src/scene/gsplat-unified/gsplat-octree.js:173 — constructor has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 4, if/else 3 (4 pts), loops 2 (nesting depth added 4). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 200, 180). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · setTheme (cognitive 16) · ×1
  • setTheme (cognitive 16) src/extras/gizmo/transform-gizmo.js:733 — 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.
D2 · Cognitive Complexity · watchUnbundled (cognitive 16) · ×1
  • watchUnbundled (cognitive 16) utils/esbuild-build-target.mjs:556 — watchUnbundled has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 5, ternaries 2 (3 pts), other 2 (nesting depth added 1). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 14 function items inside it that branch (update, queue, rebuild::(anonymous), …). 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.
D2 · Cognitive Complexity · add · ×1
  • 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: Node.js 18 — .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.
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (67 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (67 clone groups) src/framework/components/gsplat/component.js:423 — 67 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 45 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 67 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 67 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 67 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 · Duplication concentrated across 23 sibling directories (64 clone groups) · ×1
  • Duplication concentrated across 23 sibling directories (64 clone groups) src/framework/components/model/component.js:158 — 64 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) — 49 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 64 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 64 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 64 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 · Duplication concentrated across 2 sibling directories (34 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (34 clone groups) scripts/esm/parsers/obj-model.mjs:31 — 34 duplicated blocks under the repository root have copies in at least two of the sibling directories scripts, src — 14 of them are reported below, and 20 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 34 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 34 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 34 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 · Duplication concentrated across 11 sibling directories (18 clone groups) · ×1
  • Duplication concentrated across 11 sibling directories (18 clone groups) src/scene/gsplat-unified/gsplat-params.js:936 — 18 duplicated blocks under src/scene/ have copies in at least two of the sibling directories composition, geometry, graphics, gsplat, gsplat-unified, lighting (+5 more sibling(s) not listed) — 9 of them are reported below, and 9 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 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 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 18 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 · Duplication concentrated across 9 sibling directories (10 clone groups) · ×1
  • Duplication concentrated across 9 sibling directories (10 clone groups) src/framework/anim/evaluator/anim-target.js:46 — 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.
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (6 clone groups) src/platform/graphics/webgl/webgl-xr-bridge.js:265 — 6 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 2 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 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 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 6 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 (270 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (270 matched lines × 2 locations) src/extras/gizmo/scale-gizmo.js:17 — src/extras/gizmo/scale-gizmo.js:17 · src/extras/gizmo/translate-gizmo.js:17 — the two spans are one implementation copied and then locally edited — 2012 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:196 — the two spans are one implementation copied and then locally edited — 1528 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.
R10 · Code Duplication · Wholesale file copy (164 identical lines × 2 files) · ×1
  • Wholesale file copy (164 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 — 164 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (136 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (136 matched lines × 2 locations) src/core/math/vec3.js:108 — src/core/math/vec3.js:108 · src/core/math/vec4.js:111 — the two spans are one implementation copied and then locally edited — 1178 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (108 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (108 matched lines × 2 locations) scripts/esm/gsplat/gsplat-image.mjs:32 — scripts/esm/gsplat/gsplat-image.mjs:32 · scripts/esm/gsplat/gsplat-text.mjs:74 — the two spans are one implementation copied and then locally edited — 779 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (88 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (88 matched lines × 2 locations) src/extras/gizmo/shape/arrow-shape.js:13 — src/extras/gizmo/shape/arrow-shape.js:13 · src/extras/gizmo/shape/boxline-shape.js:13 — 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:535 — src/platform/graphics/webgl/webgl-texture.js:535 · src/platform/graphics/webgl/webgl-texture.js:724 — the two spans are one implementation copied and then locally edited — 412 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (83 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (83 matched lines × 2 locations) src/framework/parsers/sog-bundle.js:141 — src/framework/parsers/sog-bundle.js:141 · src/framework/parsers/sog.js:81 — the two spans are one implementation copied and then locally edited — 531 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (67 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (67 matched lines × 2 locations) src/scene/gsplat-unified/gsplat-hybrid-renderer.js:118 — src/scene/gsplat-unified/gsplat-hybrid-renderer.js:118 · src/scene/gsplat-unified/gsplat-quad-renderer.js:32 — the two spans are one implementation copied and then locally edited — 383 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (66 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (66 matched lines × 2 locations) src/scene/light.js:492 — src/scene/light.js:492 · src/scene/light.js:711 — 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 (61 lines × 2 locations) · ×1
  • Duplicated block (61 lines × 2 locations) src/framework/components/button/system.js:23 — src/framework/components/button/system.js:23 · src/framework/components/scroll-view/system.js:27 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (60 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (60 matched lines × 2 locations) src/extras/input/sources/dual-gesture-source.js:165 — src/extras/input/sources/dual-gesture-source.js:165 · src/extras/input/sources/single-gesture-source.js:126 — the two spans are one implementation copied and then locally edited — 395 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (57 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (57 matched lines × 2 locations) src/framework/components/rigid-body/component.js:205 — src/framework/components/rigid-body/component.js:205 · src/framework/components/rigid-body/component.js:403 — the two spans are one implementation copied and then locally edited — 283 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (54 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (54 matched lines × 2 locations) src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:453 — src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:453 · src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:576 — the two spans are one implementation copied and then locally edited — 480 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 (53 matched lines × 2 locations) · ×1
  • 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.
R10 · Code Duplication · Duplicated block (52 lines × 2 locations) · ×1
  • Duplicated block (52 lines × 2 locations) scripts/posteffects/posteffect-brightnesscontrast.js:37 — scripts/posteffects/posteffect-brightnesscontrast.js:37 · scripts/posteffects/posteffect-huesaturation.js:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (49 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (49 matched lines × 2 locations) src/core/math/quat.js:36 — src/core/math/quat.js:36 · src/core/math/vec4.js:25 — the two spans are one implementation copied and then locally edited — 347 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (48 lines × 2 locations) · ×1
  • 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:102 — 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) REDACTED:523 — REDACTED:523 · REDACTED:1106 — the two spans are one implementation copied and then locally edited — 423 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (45 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (45 matched lines × 2 locations) src/scene/gsplat-unified/gsplat-interval-compaction.js:150 — src/scene/gsplat-unified/gsplat-interval-compaction.js:150 · src/scene/gsplat-unified/gsplat-projector.js:237 — the two spans are one implementation copied and then locally edited — 267 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (44 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (44 matched lines × 2 locations) src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:20 — src/scene/graphics/radix-sort/compute-radix-sort-multipass.js:20 · src/scene/graphics/radix-sort/compute-radix-sort-onesweep.js:20 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (42 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (42 matched lines × 2 locations) scripts/posteffects/posteffect-blend.js:46 — scripts/posteffects/posteffect-blend.js:46 · scripts/posteffects/posteffect-outline.js:74 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (42 lines × 2 locations) · ×1
  • 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:33 — 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 (40 lines × 2 locations) · ×1
  • Duplicated block (40 lines × 2 locations) REDACTED:6444 — REDACTED:6444 · REDACTED:6512 — all 2 copies are in the same file, 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 (38 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (38 matched lines × 2 locations) src/extras/input/sources/dual-gesture-source.js:88 — src/extras/input/sources/dual-gesture-source.js:88 · src/extras/input/sources/single-gesture-source.js:54 — the two spans are one implementation copied and then locally edited — 239 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (37 lines × 2 locations) · ×1
  • 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.
R10 · Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (37 matched lines × 2 locations) src/framework/anim/controller/anim-blend-tree-2d-cartesian.js:17 — src/framework/anim/controller/anim-blend-tree-2d-cartesian.js:17 · src/framework/anim/controller/anim-blend-tree-2d-directional.js:16 — the two spans are one implementation copied and then locally edited — 331 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 (35 lines × 2 locations) · ×1
  • Duplicated block (35 lines × 2 locations) src/platform/graphics/webgl/webgl-graphics-device.js:501 — src/platform/graphics/webgl/webgl-graphics-device.js:501 · src/platform/graphics/webgl/webgl-graphics-device.js:610 — all 2 copies are in the same file, 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.
R2 · Cyclomatic Complexity · Complex function initializeComponentData (cyclomatic 84, cognitive 128) · ×1
  • Complex function initializeComponentData (cyclomatic 84, cognitive 128) src/framework/components/element/system.js:105 — initializeComponentData has cyclomatic complexity 84 and cognitive complexity 128; 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.
R2 · Cyclomatic Complexity · Complex function _updateMeshes (cyclomatic 79, cognitive 212) · ×1
  • Complex function _updateMeshes (cyclomatic 79, cognitive 212) src/framework/components/element/text-element.js:863 — _updateMeshes has cyclomatic complexity 79 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.
R2 · Cyclomatic Complexity · Complex function initialize (cyclomatic 76, cognitive 4) · ×1
  • Complex function initialize (cyclomatic 76, cognitive 4) src/platform/graphics/webgl/webgl-texture.js:109 — initialize has cyclomatic complexity 76 and cognitive complexity 4; 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.
R2 · Cyclomatic Complexity · Complex function upload (cyclomatic 74, cognitive 197) · ×1
  • Complex function upload (cyclomatic 74, cognitive 197) src/platform/graphics/webgl/webgl-texture.js:476 — upload has cyclomatic complexity 74 and cognitive complexity 197; 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.
R2 · Cyclomatic Complexity · Complex function readAnimation (cyclomatic 73, cognitive 244) · ×1
  • Complex function readAnimation (cyclomatic 73, cognitive 244) REDACTED:5628 — readAnimation has cyclomatic complexity 73 and cognitive complexity 244; 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.
R2 · Cyclomatic Complexity · Complex function constructor (cyclomatic 69, cognitive 80) · ×1
  • Complex function constructor (cyclomatic 69, cognitive 80) src/platform/graphics/render-target.js:356 — constructor has cyclomatic complexity 69 and cognitive complexity 80; 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.
R2 · Cyclomatic Complexity · Complex function readAnimation (cyclomatic 67, cognitive 207) · ×1
  • Complex function readAnimation (cyclomatic 67, cognitive 207) REDACTED:4306 — readAnimation has cyclomatic complexity 67 and cognitive complexity 207; 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.
R2 · Cyclomatic Complexity · Complex function readSkeletonData (cyclomatic 61, cognitive 163) · ×1
  • Complex function readSkeletonData (cyclomatic 61, cognitive 163) REDACTED:5279 — readSkeletonData has cyclomatic complexity 61 and cognitive complexity 163; 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.
R2 · Cyclomatic Complexity · Complex function _updateText (cyclomatic 58, cognitive 123) · ×1
  • Complex function _updateText (cyclomatic 58, cognitive 123) src/framework/components/element/text-element.js:375 — _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.
R2 · Cyclomatic Complexity · Complex function writeStandardMaterial (cyclomatic 57, cognitive 79) · ×1
  • Complex function writeStandardMaterial (cyclomatic 57, cognitive 79) src/extras/exporters/gltf-exporter.js:410 — writeStandardMaterial has cyclomatic complexity 57 and cognitive complexity 79; 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.
R2 · Cyclomatic Complexity · Complex function rawToValue (cyclomatic 56, cognitive 106) · ×1
  • 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.
R2 · Cyclomatic Complexity · Complex function cullShadowCastersOmni (cyclomatic 55, cognitive 54) · ×1
  • Complex function cullShadowCastersOmni (cyclomatic 55, cognitive 54) src/scene/renderer/shadow-renderer.js:292 — 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 50, cognitive 47) · ×1
  • Complex function (anonymous) (cyclomatic 50, cognitive 47) REDACTED:3 — (anonymous) has cyclomatic complexity 50 and cognitive complexity 47; 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.
R2 · Cyclomatic Complexity · Complex function apply (cyclomatic 46, cognitive 131) · ×1
  • Complex function apply (cyclomatic 46, cognitive 131) REDACTED:733 — apply has cyclomatic complexity 46 and cognitive complexity 131; 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.
R2 · Cyclomatic Complexity · Complex function _preprocess (cyclomatic 45, cognitive 113) · ×1
  • Complex function _preprocess (cyclomatic 45, cognitive 113) src/core/preprocessor.js: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.
R2 · Cyclomatic Complexity · Complex function update (cyclomatic 45, cognitive 105) · ×1
  • 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.
R2 · Cyclomatic Complexity · Complex function _validateCopy (cyclomatic 45, cognitive 30) · ×1
  • Complex function _validateCopy (cyclomatic 45, cognitive 30) src/platform/graphics/texture.js:1482 — _validateCopy has cyclomatic complexity 45 and cognitive complexity 30; 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.
R2 · Cyclomatic Complexity · Complex function validate (cyclomatic 43, cognitive 94) · ×1
  • 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.
R2 · Cyclomatic Complexity · Complex function constructor (cyclomatic 43, cognitive 44) · ×1
  • Complex function constructor (cyclomatic 43, cognitive 44) src/platform/graphics/texture.js:294 — constructor has cyclomatic complexity 43 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function frameUpdate (cyclomatic 42, cognitive 86) · ×1
  • Complex function frameUpdate (cyclomatic 42, cognitive 86) src/extras/render-passes/render-pass-compose.js:378 — frameUpdate has cyclomatic complexity 42 and cognitive complexity 86; 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 · Large Files · ×1
  • Large Files — 131 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: src/platform/graphics/webgl/webgl-graphics-device.js (2795), src/framework/components/element/component.js (2584), src/scene/materials/standard-material.js (2204), src/platform/graphics/constants.js (2165), src/framework/components/particle-system/component.js (2096), src/framework/components/element/text-element.js (1986) (+125 more).
R7 · Dead Code · Dead file (~10 LoC) · ×1
  • Dead file (~10 LoC) src/scene/shader-lib/glsl/chunks/lit/vert/viewNormal.js — no import path from any entry point (117 application, 7 tooling, 296 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
X29 · Per-element action decided by a fixed element · Per-element action decided by a fixed element · ×1
  • Per-element action decided by a fixed element REDACTED:1808 — This loop runs once per element of `timelineMode`, and the statement it guards acts on the element it is on — `timelineMode[i]`. The test deciding whether that statement runs does not: `to == null || timeline instanceof spine.AttachmentTimeline || timeline instan...` reads `timelineMode[ii]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts — the fixed one at line 1418, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out.
Minor — 32 finding(s)
R7 · Dead Code · Unused export 'default' · ×14
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-interval-cull.js:111 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-interval-scatter.js:61 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-project-common.js:104 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-projector-write-indirect-args.js:60 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-projector.js:311 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-shadow-cull.js:142 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-shadow-indirect-args.js:43 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-write-indirect-args.js:85 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/radix-sort/compute-prefix-sum.js:118 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' src/scene/shader-lib/wgsl/chunks/radix-sort/compute-radix-sort-4bit.js:67 — 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.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 148 significant file(s) lose their only recent owner: src/platform/graphics/webgpu/webgpu-graphics-device.js, src/platform/graphics/graphics-device.js, src/scene/renderer/renderer.js, src/framework/lightmapper/lightmapper.js, src/scene/gsplat-unified/gsplat-octree-instance.js, src/extras/render-passes/frame-pass-camera-frame.js, src/extras/render-passes/frame-pass-volumetric-fog.js, src/scene/gsplat-unified/gsplat-params.js (+140 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 51 significant file(s) lose their only recent owner: src/framework/components/joint/component.js, src/framework/components/rigid-body/system.js, src/framework/input/element-input.js, src/framework/components/collision/component.js, src/framework/xr/xr-input-source.js, src/framework/physics/ammo/ammo-physics-world.js, src/extras/exporters/usdz-exporter.js, src/framework/physics/physics-world.js (+43 more). Pair on, review, or document these before any departure.
D19 · Documentation Quality · Documentation · ×2
  • Documentation: no project overview README.md — The README begins with a long licensing/banner section, then links to the user manual, API reference, examples, blog, forum, and multilingual README; it does not state what the PlayCanvas Engine is or what it does. State the engine's purpose (WebGPU/WebGL2 3D game/engine) in a one-line overview above the license section.
  • Documentation: no contributor guidance README.md — The README does not guide contributors on how to submit pull requests or add new docs. Add a short contributing section covering PR guidelines, documentation contribution process, and code of conduct.
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 (200 single-owned of 609 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 609 of the 1258 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (244720 LoC, 851 public types across 104 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 5 of 609 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 and example/demo trees and test files identified by path convention, largest first; 609 of the 1258 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-mesh-detection.js, src/framework/anim/evaluator/anim-target-value.js, src/framework/i18n/utils.js, src/scene/shader-lib/glsl/chunks/lit/frag/iridescenceDiffraction.js, src/scene/shader-lib/glsl/chunks/particle/frag/particleUpdaterStart.js. 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • 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.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — 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 23202 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.
P4 · Deployment & Rollback · No release approval gate · ×1
  • 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.
P6 · Release Hygiene · No changelog · ×1
  • 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 'COLOR_YELLOW' · ×1
  • Unused export 'COLOR_YELLOW' src/extras/gizmo/color.js:6 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'typesFixup' · ×1
  • Unused export 'typesFixup' utils/plugins/rollup-types-fixup.mjs:316 — Nothing imports this binding — it is safe to review for removal.
X10 · Duplicated predicate · Duplicated predicate · ×1
  • Duplicated predicate src/framework/parsers/draco-worker.js:3 — `(typeof self !== 'undefined' && self) || (require('node:worker_threads').parentPort)` appears character-identically in 3 files — src/framework/parsers/draco-worker.js, 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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch examples/src/app/download-project.mjs:119 — `fontPages` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Minor — 24 finding(s)
D10 · Test Quality · Skipped (documented) · ×24
  • Skipped (documented): assets not in asset registry get loaded after they are added to the registry test/framework/i18n/i18n.test.mjs:592 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skip
  • Skipped (documented): assets in asset registry get loaded when passed to i18n test/framework/i18n/i18n.test.mjs:609 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skip
  • Skipped (documented): lets a destroyed application be garbage collected test/framework/physics/ammo/ammo-physics-world.test.mjs:1144 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): the wasm binary declares a 16MB initial heap that can grow test/framework/physics/ammo/ammo-builds.test.mjs:83 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): the wasm glue instantiates its binary and grows the heap on demand test/framework/physics/ammo/ammo-builds.test.mjs:94 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): the asm.js fallback starts at 16MB and grows the heap on demand test/framework/physics/ammo/ammo-builds.test.mjs:103 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): asserts on a multisampled texture with an incapable format test/platform/graphics/texture.test.mjs:126 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): leaves the textures on the scope when the device has no bind groups test/scene/materials/standard-material-uniform-buffer.test.mjs:937 — 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:141 — 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): 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): 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:201 — 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): 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

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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-e32ef29c1ef747d184366d3c89c16960/history.json --exit-code 0 --source .136artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-e32ef29c1ef747d184366d3c89c16960/tree.json --exit-code 0 --source .18artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .36artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update8artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—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.0—
D37 · Vulnerability-disclosure Policydisclosure—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.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a0f940-1fb5-729d-b8a1-04b30bb02b91 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md