Public report of mrdoob/three.js, published 24 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 24 October 2026, 12:09 UTC · Survey ID cd_8059b7a952a0487e980126734489b7cf

mrdoob/three.js

Measured 24 October 2026, 11:43 UTC, at code version 5e6eee6

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Test distribution is not measured: No automated tests.

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 38out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 2 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A very large codebase: 645,284 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 3.9 person-years · Weakest lens: Accessibility, 28

Findings by how serious they are

93 critical 1309 serious 96 minor

10 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 11:43 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

68of 72 dimensions measured by tools. The other 4 are advisory notes from an AI model, which explain the code but don't count towards the score.
1476of 1498 findings point to an exact file and line, so you can open each one in the code. The other 22 concern the repository as a whole, such as missing documentation.
72dimensions across 7 lenses, read from 645,284 lines of product code in 2 projects.
Chapters

Executive summary

mrdoob/three.js scores 38 out of 100 and is rated Weak, while five of its seven lenses score higher still: Architecture at 87 and Security and Compliance at 60, both rated Adequate, Performance at 85 and Maturity at 70, both rated Strong, and Production Readiness at 41, rated Weak.

The score is lower than those five because the weakest lens counts most, and here that is Accessibility, which scores 28 and is rated Weak. Its Keyboard semantics dimension scores 1 out of 10, and until that reaches 4, Accessibility can't be rated higher than Adequate. The first actions are to resolve the 1 No tests found finding(s) in Test Distribution and to make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href, and if Accessibility rose to 70, the score would rise from 38 to about 46.

93 findings are critical: 37 in Text alternatives, 31 in Page structure, eight in Secrets (history), seven in Forms & labels, four in Static Analysis (SAST), two in Dependency Hygiene, two in Keyboard semantics, one in Dependency Vulnerabilities and one in Knowledge Freshness.

Watchdog couldn't measure 8 dimensions in this code, among them Code Duplication, Code Coverage and License Compliance, so they are left out of the score. The product code is 645,284 lines, which would take an estimated 3.9 person-years, around €570,000, to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Accessibility 28 · counts for 46%Code Health 36 · counts for 25%Production Readiness 41 · counts for 14%Security and Compliance 60 · counts for 8%Maturity 70 · counts for 4%Performance 85 · counts for 2%Architecture 87 · counts for 1%

If Accessibility rose from 28 to 70, the lowest score rated Strong, the score would rise from 38 to about 46.

Code composition: what the lines of code are
Product code 96%Tests 4%
New since the last survey: 140 findings

These 140 critical or serious findings weren't in the previous survey, on 10 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 1098 findings

These 1098 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · Instance.instance (cyclomatic 19) src/nodes/accessors/Instance.js
  • Cyclomatic Complexity · StackNode.build (cyclomatic 17) src/nodes/core/StackNode.js
  • Cyclomatic Complexity · VarNode.build (cyclomatic 16) src/nodes/core/VarNode.js
  • Cognitive Complexity · build (cognitive 81) src/nodes/core/Node.js
  • Cognitive Complexity · WebGLBackend.draw (cognitive 70) src/renderers/webgl-fallback/WebGLBackend.js
  • Cognitive Complexity · WebGPUBackend.draw (cognitive 65) src/renderers/webgpu/WebGPUBackend.js
  • Cognitive Complexity · ShaderCallNodeInternal.call (cognitive 44) src/nodes/tsl/TSLCore.js
  • Cognitive Complexity · Node._getChildren (cognitive 30) src/nodes/core/Node.js
  • Cognitive Complexity · Instance.instance (cognitive 27) src/nodes/accessors/Instance.js
  • Cognitive Complexity · ShaderCallNodeInternal.build (cognitive 19) src/nodes/tsl/TSLCore.js
  • Cognitive Complexity · TextureNode.setup (cognitive 18) src/nodes/accessors/TextureNode.js
  • Cohesion (LCOM4) · Low cohesion: Loader (LCOM4 6) src/loaders/Loader.js
  • Churn × Complexity Hotspots · Hotspot: src/nodes/accessors/Instance.js src/nodes/accessors/Instance.js
  • Churn × Complexity Hotspots · Hotspot: src/renderers/webgl/WebGLOutput.js src/renderers/webgl/WebGLOutput.js
  • Churn × Complexity Hotspots · Hotspot: src/materials/nodes/MeshPhysicalNodeMaterial.js src/materials/nodes/MeshPhysicalNodeMaterial.js
  • Churn × Complexity Hotspots · Hotspot: examples/jsm/renderers/CSS2DRenderer.js examples/jsm/renderers/CSS2DRenderer.js
  • Knowledge Freshness · Orphaned knowledge manual/resources/threejs-primitives.js
  • Change Coupling · Boundary-crossing change coupling: MeshPhysicalMaterial.js ↔ meshphysical.glsl.js src/materials/MeshPhysicalMaterial.js
  • Change Coupling · Boundary-crossing change coupling: MeshPhysicalMaterial.js ↔ lights_physical_fragment.glsl.js src/materials/MeshPhysicalMaterial.js
  • Change Coupling · Boundary-crossing change coupling: MeshPhysicalMaterial.js ↔ ShaderLib.js src/materials/MeshPhysicalMaterial.js
  • Change Coupling · Boundary-crossing change coupling: MeshPhysicalMaterial.js ↔ WebGLMaterials.js src/materials/MeshPhysicalMaterial.js
  • Change Coupling · Boundary-crossing change coupling: MeshPhysicalMaterial.js ↔ WebGLProgram.js src/materials/MeshPhysicalMaterial.js
  • Change Coupling · Boundary-crossing change coupling: MeshPhysicalMaterial.js ↔ lights_physical_pars_fragment.glsl.js src/materials/MeshPhysicalMaterial.js
  • Change Coupling · Change coupling: lights_physical_fragment.glsl.js ↔ ShaderLib.js src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js
  • Change Coupling · Change coupling: Bindings.js ↔ NodeSampledTexture.js src/renderers/common/Bindings.js
  • Code Duplication · Duplicated block with local edits (120 matched lines × 2 locations) src/renderers/WebGLRenderer.js
  • Code Duplication · Duplicated block with local edits (45 matched lines × 2 locations) src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js
  • Code Duplication · Duplicated block (41 lines × 5 locations) src/nodes/accessors/Camera.js
  • Code Duplication · Duplicated block (36 lines × 2 locations) editor/js/commands/MultiCmdsCommand.js
  • Code Duplication · Duplicated block (35 lines × 2 locations) editor/js/commands/SetScriptValueCommand.js
  • Code Duplication · Duplicated block (35 lines × 2 locations) src/renderers/webgl/WebGLUniforms.js
  • Code Duplication · Duplicated block (35 lines × 2 locations) src/renderers/webgpu/utils/WebGPUPipelineUtils.js
  • Code Duplication · Duplicated block (35 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (34 lines × 2 locations) editor/js/History.js
  • Code Duplication · Duplicated block (34 lines × 2 locations) src/math/Vector3.js
  • Code Duplication · Duplicated block (33 lines × 3 locations) src/loaders/AnimationLoader.js
  • Code Duplication · Duplicated block (33 lines × 2 locations) src/loaders/BufferGeometryLoader.js
  • Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) editor/js/commands/AddScriptCommand.js
  • Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) src/core/BufferAttribute.js
  • Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) src/nodes/utils/FlipNode.js
  • Code Duplication · Duplicated block (30 lines × 3 locations) editor/js/Sidebar.Geometry.BoxGeometry.js
  • Code Duplication · Duplicated block (30 lines × 2 locations) src/math/Vector3.js
  • Code Duplication · Duplicated block (30 lines × 2 locations) src/objects/InstancedMesh.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) src/nodes/accessors/BufferAttributeNode.js
  • Code Duplication · Duplicated block (28 lines × 2 locations) editor/js/Sidebar.Material.js
  • Code Duplication · Duplicated block with local edits (28 matched lines × 2 locations) src/extras/curves/CatmullRomCurve3.js
  • Code Duplication · Duplicated block with local edits (28 matched lines × 2 locations) src/geometries/TorusGeometry.js
  • Code Duplication · Duplicated block (28 lines × 2 locations) src/math/Matrix3.js
  • Code Duplication · Duplicated block (28 lines × 2 locations) src/renderers/webgl-fallback/utils/WebGLState.js
  • Code Duplication · Duplicated block (28 lines × 2 locations) tsl/js/code/CodeCompiler.js
  • Code Duplication · Duplicated block (27 lines × 2 locations) editor/js/Sidebar.Material.BooleanProperty.js
  • Code Duplication · Duplicated block (27 lines × 2 locations) src/renderers/webgl/WebGLUniforms.js
  • Code Duplication · Duplicated block (27 lines × 2 locations) src/utils.js
  • Code Duplication · Duplicated block (26 lines × 3 locations) src/math/Vector2.js
  • Code Duplication · Duplicated block (26 lines × 2 locations) src/renderers/WebGL3DRenderTarget.js
  • Code Duplication · Duplicated block (26 lines × 3 locations) src/renderers/webgl/WebGLUniforms.js
  • Code Duplication · Duplicated block (26 lines × 2 locations) tsl/js/utils/MarkdownUtils.js
  • Code Duplication · Duplicated block with local edits (25 matched lines × 2 locations) src/renderers/common/Geometries.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) editor/js/Sidebar.Geometry.RingGeometry.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) editor/js/Sidebar.Project.Resources.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) src/materials/PointsMaterial.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) src/math/Vector3.js
  • Code Duplication · Duplicated block with local edits (24 matched lines × 2 locations) src/nodes/accessors/Skinning.js
  • Code Duplication · Duplicated block with local edits (24 matched lines × 2 locations) src/nodes/math/PackFloatNode.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) src/objects/BatchedMesh.js
  • Code Duplication · Duplicated block (23 lines × 3 locations) editor/js/Menubar.Add.js
  • Code Duplication · Duplicated block (23 lines × 2 locations) editor/js/libs/ui.three.js
  • Code Duplication · Duplicated block (23 lines × 2 locations) src/extras/core/Shape.js
  • Code Duplication · Duplicated block (23 lines × 3 locations) src/math/Vector2.js
  • Code Duplication · Duplicated block (23 lines × 2 locations) src/nodes/accessors/Bitangent.js
  • Code Duplication · Duplicated block with local edits (23 matched lines × 2 locations) src/renderers/webgl/WebGLBackground.js
  • Code Duplication · Duplicated block (23 lines × 2 locations) tsl/js/utils/MarkdownUtils.js
  • Code Duplication · Duplicated block (22 lines × 4 locations) editor/js/Sidebar.Geometry.DodecahedronGeometry.js
  • Code Duplication · Duplicated block (22 lines × 2 locations) src/math/Vector3.js
  • Code Duplication · Duplicated block (22 lines × 2 locations) src/objects/SkinnedMesh.js
  • Code Duplication · Duplicated block (22 lines × 3 locations) tsl/js/imports/scripts/scenes/empty.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) editor/js/Sidebar.Geometry.CircleGeometry.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) editor/js/libs/ui.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) src/core/BufferAttribute.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) src/loaders/ObjectLoader.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) src/materials/nodes/NodeMaterial.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) src/math/Color.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) src/math/Vector2.js
  • Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) src/objects/Mesh.js
  • Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) src/renderers/webgl-fallback/WebGLBackend.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) src/renderers/webgl/WebGLBindingStates.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) tsl/js/managers/ConsoleManager.js
  • Code Duplication · Duplicated block (20 lines × 2 locations) editor/js/Loader.js
  • Code Duplication · Duplicated block (20 lines × 2 locations) editor/js/Menubar.File.js
  • Code Duplication · Duplicated block (20 lines × 3 locations) src/nodes/materialx/MaterialXNoise.js
  • Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) src/renderers/webgl-fallback/WebGLBackend.js
  • Code Duplication · Duplicated block (20 lines × 2 locations) tsl/js/managers/LayoutManager.js
  • Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) tsl/js/managers/LayoutManager.js
  • Code Duplication · Duplicated block (20 lines × 2 locations) tsl/js/utils/CodeEditorUtils.js
  • Code Duplication · Duplicated block (19 lines × 2 locations) editor/js/Editor.js
  • Code Duplication · Duplicated block (19 lines × 2 locations) src/cameras/Camera.js
  • Code Duplication · Duplicated block (19 lines × 2 locations) src/nodes/accessors/CubeTextureNode.js
  • Code Duplication · Duplicated block (19 lines × 3 locations) src/renderers/webgl/WebGLUniforms.js
  • Code Duplication · Duplicated block (19 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (18 matched lines × 2 locations) editor/js/Sidebar.Geometry.ShapeGeometry.js
Rebuild cost: about €570,000 · Estimate
Cost to rebuild€190,000 to €960,000, for 3,180 to 10,089 hours of work, about 3.9 person-years for 2 to 8 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 38. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeVery large: 645,284 lines of product code

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 1 No tests found finding(s) in Test Distribution.
Raises the score by about 4 points · Low effort · Test Distribution
2
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 5 points · Medium effort · Keyboard semantics
3
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 5 points · Medium effort · Text alternatives

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €570,000 to build again, about 3.9 person-years of work. Its weakest lens is Accessibility, at 28 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No tests found finding(s) in Test Distribution. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 1 Test Distribution findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.8 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 8% to 18% on every change. The history of the code shows how much it changes: about 289,345 lines over the last 90 days, which is about 1,173,455 lines a year. At that pace, the extra work comes to an estimated 234.3 to 1405.7 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

1112 modules, with 672 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 1072 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 REDACTED.Command2 examples.jsm.generators.city.InstancedMeshGenerator3 examples.jsm.inspector.extensions.color-grading.modules.Module4 examples.jsm.libs.motion-controllers_module5 src.animation.KeyframeTrack6 src.core.EventDispatcher7 src.extras.core.Curve8 src.lights.LightShadow9 src.loaders.Loader10 src.math.Interpolant11 src.nodes.core.LightingModel12 src.renderers.common.DataMap13 examples.jsm.inspector.ui.Tab14 src.core.BufferAttribute15 src.core.BufferGeometry16 src.core.Object3D17 src.core.RenderTarget18 src.extras.Controls19 src.loaders.CompressedTextureLoader20 src.loaders.DataTextureLoader21 src.materials.Material22 src.nodes.core.Node23 src.textures.Texture24 examples.jsm.postprocessing.Pass25 src.geometries.PolyhedronGeometry26 src.lights.Light27 src.materials.ShaderMaterial28 src.materials.nodes.NodeMaterial29 src.nodes.core.InputNode30 src.nodes.lighting.LightingNode31 src.nodes.lighting.ShadowBaseNode32 src.nodes.utils.ArrayElementNode33 src.objects.Group34 src.objects.Line35 src.objects.Mesh36 src.nodes.core.UniformNode37 src.nodes.lighting.AnalyticLightNode38 src.objects.LineSegments39 src.nodes.accessors.TextureNode40 src.nodes.display.PassNode
1 REDACTED.Command
2 examples.jsm.generators.city.InstancedMeshGenerator
3 examples.jsm.inspector.extensions.color-grading.modules.Module
4 examples.jsm.libs.motion-controllers_module
5 src.animation.KeyframeTrack
6 src.core.EventDispatcher
7 src.extras.core.Curve
8 src.lights.LightShadow
9 src.loaders.Loader
10 src.math.Interpolant
11 src.nodes.core.LightingModel
12 src.renderers.common.DataMap
13 examples.jsm.inspector.ui.Tab1
14 src.core.BufferAttribute1
15 src.core.BufferGeometry1
16 src.core.Object3D1
17 src.core.RenderTarget1
18 src.extras.Controls1
19 src.loaders.CompressedTextureLoader1
20 src.loaders.DataTextureLoader1
21 src.materials.Material1
22 src.nodes.core.Node1
23 src.textures.Texture1
24 examples.jsm.postprocessing.Pass1
25 src.geometries.PolyhedronGeometry1
26 src.lights.Light1
27 src.materials.ShaderMaterial1
28 src.materials.nodes.NodeMaterial1
29 src.nodes.core.InputNode1
30 src.nodes.lighting.LightingNode1
31 src.nodes.lighting.ShadowBaseNode1
32 src.nodes.utils.ArrayElementNode1
33 src.objects.Group1
34 src.objects.Line1
35 src.objects.Mesh1
36 src.nodes.core.UniformNode1
37 src.nodes.lighting.AnalyticLightNode1
38 src.objects.LineSegments1
39 src.nodes.accessors.TextureNode1
40 src.nodes.display.PassNode11
Uses a module listed above itPart of a loopThe module itself
1 REDACTED.Command2 examples.jsm.generators.city.InstancedMeshGenerator3 examples.jsm.inspector.extensions.color-grading.modules.Module4 examples.jsm.libs.motion-controllers_module5 src.animation.KeyframeTrack6 src.core.EventDispatcher7 src.extras.core.Curve8 src.lights.LightShadow9 src.loaders.Loader10 src.math.Interpolant11 src.nodes.core.LightingModel12 src.renderers.common.DataMap13 examples.jsm.inspector.ui.Tab14 src.core.BufferAttribute15 src.core.BufferGeometry16 src.core.Object3D17 src.core.RenderTarget18 src.extras.Controls19 src.loaders.CompressedTextureLoader20 src.loaders.DataTextureLoader21 src.materials.Material22 src.nodes.core.Node23 src.textures.Texture24 examples.jsm.postprocessing.Pass25 src.geometries.PolyhedronGeometry26 src.lights.Light27 src.materials.ShaderMaterial28 src.materials.nodes.NodeMaterial29 src.nodes.core.InputNode30 src.nodes.lighting.LightingNode31 src.nodes.lighting.ShadowBaseNode32 src.nodes.utils.ArrayElementNode33 src.objects.Group34 src.objects.Line35 src.objects.Mesh36 src.nodes.core.UniformNode37 src.nodes.lighting.AnalyticLightNode38 src.objects.LineSegments39 src.nodes.accessors.TextureNode40 src.nodes.display.PassNodeREDACTED.Command1examples.jsm.generators.city.InstancedMeshGenerator2examples.jsm.inspector.extensions.color-grading.modules.Module3examples.jsm.libs.motion-controllers_module4src.animation.KeyframeTrack5src.core.EventDispatcher6src.extras.core.Curve7src.lights.LightShadow8src.loaders.Loader9src.math.Interpolant10src.nodes.core.LightingModel11src.renderers.common.DataMap12examples.jsm.inspector.ui.Tab13src.core.BufferAttribute14src.core.BufferGeometry15src.core.Object3D16src.core.RenderTarget17src.extras.Controls18src.loaders.CompressedTextureLoader19src.loaders.DataTextureLoader20src.materials.Material21src.nodes.core.Node22src.textures.Texture23examples.jsm.postprocessing.Pass24src.geometries.PolyhedronGeometry25src.lights.Light26src.materials.ShaderMaterial27src.materials.nodes.NodeMaterial28src.nodes.core.InputNode29src.nodes.lighting.LightingNode30src.nodes.lighting.ShadowBaseNode31src.nodes.utils.ArrayElementNode32src.objects.Group33src.objects.Line34src.objects.Mesh35src.nodes.core.UniformNode36src.nodes.lighting.AnalyticLightNode37src.objects.LineSegments38src.nodes.accessors.TextureNode39src.nodes.display.PassNode4011111111111111111111111111111+1072 more modules (most-connected shown)

At a glance — Code Health · 36% · Weak · gated by D1, D2, R1, R2 ·

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

At a glance — Maturity · 70% · Strong ·

At a glance — Readiness · 41% · Weak · gated by D9, P7 ·

At a glance — Security · 60% · Adequate · gated by D28, D29 ·

At a glance — Accessibility · 28% · Weak · gated by AC1, AC3, AC4 ·

At a glance — Performance · 85% · Strong ·

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
A05:2025 — Injection60High / Critical
A07:2025 — Authentication Failures9High / Critical
A03:2025 — Software Supply Chain Failures2High / Critical

Roadmap

First, ensure custom controls are fully keyboard-operable and anchors have valid hrefs to fix immediate interaction barriers. Next, address the widespread lack of text alternatives for media and structural elements by adding alt text, labels, and captions, while also correcting page structure issues like missing landmarks and titles. Finally, establish a robust testing pipeline by resolving current test distribution gaps and integrating an accessible linter with CI gates to enforce standards automatically.

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

Do thisHelpsEffortDimension
Resolve the 1 No tests found finding(s) in Test Distribution.+4.2 ptsLowTest Distribution
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+4.7 ptsMediumKeyboard semantics
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+4.7 ptsMediumText alternatives
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+2.8 ptsMediumPage structure
Enforce accessibility in the toolchain: add an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.+2.6 ptsMediumA11y enforcement
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+2.5 ptsMediumType Safety
Resolve the 7 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED, REDACTED.+1.0 ptsLowSecrets (history)
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+1.7 ptsMediumVisual & motion safety

File quality

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

FileScoreBandWorst signal
REDACTED2.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedSecrets (history): High secret: REDACTED
src/renderers/WebGLRenderer.js5.5MixedCyclomatic Complexity: WebGLRenderer.constructor::setProgram (cyclomatic 128)
src/renderers/webgl-fallback/utils/WebGLTextureUtils.js5.5MixedCyclomatic Complexity: WebGLTextureUtils.getInternalFormat (cyclomatic 93)
src/renderers/webgl-fallback/WebGLBackend.js5.5MixedCyclomatic Complexity: WebGLBackend._setFramebuffer (cyclomatic 49)
src/nodes/core/NodeBuilder.js5.5MixedCyclomatic Complexity: NodeBuilder.generateConst (cyclomatic 36)
src/renderers/webgpu/WebGPUBackend.js5.5MixedCyclomatic Complexity: WebGPUBackend._getRenderPassDescriptor (cyclomatic 34)
src/nodes/core/Node.js5.6MixedCyclomatic Complexity: Node.build (cyclomatic 42)
src/renderers/webgl-fallback/utils/WebGLState.js5.6MixedCyclomatic Complexity: WebGLState.setBlending (cyclomatic 29)
src/renderers/common/Bindings.js5.6MixedCyclomatic Complexity: Bindings._update (cyclomatic 26)
REDACTED5.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.9MixedStatic Analysis (SAST): Medium: REDACTED
src/nodes/lighting/LightsNode.js6.3MixedCognitive Complexity: LightsNode.setupLightsNode (cognitive 19)
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
editor/js/libs/codemirror/codemirror.js7.0MixedCyclomatic Complexity: codemirror.addEditorMethods (cyclomatic 139)
src/renderers/webgpu/utils/WebGPUTextureUtils.js7.0MixedCyclomatic Complexity: WebGPUTextureUtils.getFormat (cyclomatic 115)

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

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

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

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

Could not be resolved — 10

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

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 68 of 72 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.8 — 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 — 72 dimensions across the health lenses
D1D2D3D6D9D13D15D16D19D20D21D22D26D28D29D30D34D35D37D43AC1AC2AC3AC4AC6AC7AX10AX3AX4GD1IC1M1M2M3M4P1P10P2P3P6P7PF3R1R10R2R3R4R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X28X29X3X30

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, 1476 of 1498 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 01a16db9-71d5-7b07-ba51-80eb7d8a6d09.

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.

  • D4 Code Duplication — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The language model for this repository listed its production source (.html) but exposed no token stream for any of it, so nothing reached the token comparison.
  • D8 Code Coverage — 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. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — the repository root (puppeteer) — a gap in the analyzer, not something this repository is missing. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
  • D12 Dependency Hygiene — 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. This repository's 1 package.json manifest(s) and its 1 committed lockfile(s) WERE read; what went unanswered is the currency half, because it grades the production `dependencies` a lockfile resolves and these manifests declare none — only 16 devDependencies, which D12 does not grade. So registry.npmjs.org was never asked, and there was nothing here for it to grade. This is a true statement about the repository and NOT a gap on our side: the lockfile was resolved, and no reader we could write would find a production dependency in it.
  • D14 License Compliance — 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 repository declares no npm dependency a consumer installs, but 33 of the 1271 code file(s) it ships carry a sign of vendored or bundled third-party code (for example `build/three.cjs` is committed build output, which a bundler can inline undeclared third-party code into; `build/three.core.js` is committed build output, which a bundler can inline undeclared third-party code into; `examples/jsm/libs/basis/basis_transcoder.js` is minified or bundled output, which can inline third-party code; `examples/jsm/libs/basis/basis_transcoder.wasm` is a compiled binary module whose source is not in this repository; `examples/jsm/libs/fflate.module.js` states a licence of its own in its header). Code copied or bundled into a repository ships under its upstream licence, and this pass has no reader for it: it grades the licences of DECLARED packages only. So there is a licence to grade here and it was not graded — a missing collector, not a statement about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — 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. `src/math/Matrix2.js`, `src/math/Matrix3.js`, `src/math/Matrix4.js`, `src/math/Vector2.js`, `src/math/Vector3.js`, … (+2 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AC1 Text alternatives — 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. 88 further occurrence(s) are not listed individually; the score already reflects all 128.
  • AC3 Page structure — 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. 246 further occurrence(s) are not listed individually; the score already reflects all 286.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
  • 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. 529 further occurrence(s) are not listed individually; the score already reflects all 569.
  • R3 Large Files — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 64 further occurrence(s) are not listed individually; the score already reflects all 104.
  • R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 124 further occurrence(s) are not listed individually; the score already reflects all 164.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • 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.
  • 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").
  • 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.
  • 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.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • 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.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • 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.
  • 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, D22, 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 Complexity2.8 / 10Weak✓ 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 2.8 / 10 · rule-coverage 100% · ceiling Prevented

515 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was WebGLProgram.WebGLProgram at 191. A further 13 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being TextureUtils.getByteLength at 45 — they are counted neither in the figure above nor in this dimension's score. 4 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/extras/TextureUtils.js (TextureUtils.getByteLength at 45), editor/js/Loader.js (Loader::loadFile at 36), src/renderers/webgl/WebGLUniforms.js (getSingularSetter at 36), src/renderers/webgl/WebGLUniforms.js (WebGLUniforms.getSingularSetter at 36). 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.

WebGLTextures.WebGLTextures::uploadTexture (cyclomatic 79) · ×8src/renderers/webgl/WebGLTextures.js:962
WebGLRenderer.constructor::setProgram (cyclomatic 128) · ×4src/renderers/WebGLRenderer.js:2411
constructor::render (cyclomatic 47) · ×4src/renderers/WebGLRenderer.js:1641
Sidebar.Object.SidebarObject::update (cyclomatic 49) · ×2editor/js/Sidebar.Object.js:430
index.html.updateFilter (cyclomatic 40) · ×2docs/index.html:2273

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

What to do

  1. Bring the 11 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with WebGLProgram.WebGLProgram (cyclomatic 191), WebGLProgram (cyclomatic 191), Material.fromJSON (cyclomatic 164). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 11 together lifts Cyclomatic Complexity from 2.8 to about 3.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. 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 Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

764 method(s) exceeded the cognitive complexity threshold of 15; the worst was WebGLProgram at 358.

constructor::setProgram (cognitive 142) · ×10src/renderers/WebGLRenderer.js:2411
WebGLTextures::uploadCubeTexture (cognitive 176) · ×6src/renderers/webgl/WebGLTextures.js:1469
WebGLTextures.WebGLTextures::uploadTexture (cognitive 315) · ×5src/renderers/webgl/WebGLTextures.js:962
addEditorMethods::getHelpers (cognitive 17) · ×4editor/js/libs/codemirror/codemirror.js:8390
Sidebar.Object.SidebarObject::update (cognitive 87) · ×3editor/js/Sidebar.Object.js:430

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

What to do

  1. Bring the 107 bodies over 60 down to 60 or less in Cognitive Complexity — start with WebGLProgram (cognitive 358), WebGLTextures.WebGLTextures::uploadTexture (cognitive 315), WebGLTextures::uploadTexture (cognitive 315). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 107 together lifts Cognitive Complexity from 2.0 to about 3.8/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. 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 Classes9.3 / 10Stronggated by 149 serious findings✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

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

149 god class(es) detected.

FunctionTooLong: WebGLTextures.WebGLTextures · ×39src/renderers/webgl/WebGLTextures.js:7
FileTooLong: codemirror/codemirror.js · ×34editor/js/libs/codemirror/codemirror.js
MethodTooLong: WebGLRenderer.constructor · ×33src/renderers/WebGLRenderer.js:71
TooManyMethods: NodeBuilder · ×24src/nodes/core/NodeBuilder.js:175
ClassTooLong: WebGLRenderer · ×19src/renderers/WebGLRenderer.js:64

What to do

  1. Resolve the 39 FunctionTooLong finding(s) in God Classes — start with WebGLPrograms.js (3), codemirror.js (3), WebGLLights.js (2). — One of this dimension's main actionable groups (39 warning-level).
  2. Resolve the 34 FileTooLong finding(s) in God Classes — start with WebGLState.js (2), codemirror.js, WebGLRenderer.js. — One of this dimension's main actionable groups (34 warning-level).
  3. Resolve the 33 MethodTooLong finding(s) in God Classes — start with Renderer.js (3), Material.js (2), REDACTED (2). — One of this dimension's main actionable groups (33 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.

D6 · Cohesion (LCOM4)9.6 / 10Stronggated by 18 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.6 / 10 · rule-coverage 100% · ceiling Verified

18 of 549 classes have LCOM4 above 3.

Low cohesion: NodeBuilder (LCOM4 9) · ×18src/nodes/core/NodeBuilder.js:175

What to do

  1. Resolve the 18 Low cohesion finding(s) in Cohesion (LCOM4) — start with NodeBuilder.js, Loader.js, ColladaComposer.js. — One of this dimension's main actionable groups (18 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.

D9 · Test Distribution0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

No test suite found.

No tests found

What to do

  1. Resolve the 1 No tests found finding(s) in Test Distribution. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d9_recommendation.md · top locations in Appendix A, every location in findings.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.

D15 · Churn × Complexity Hotspots9.0 / 10Strong✓ 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.0 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/renderers/WebGLRenderer.js (19×459=8721); src/renderers/webgl/WebGLTextures.js (10×444=4440); REDACTED (5×273=1365)

Hotspot: src/renderers/WebGLRenderer.js · ×71src/renderers/WebGLRenderer.js:71

What to do

  1. Resolve the 71 Hotspot finding(s) in Churn × Complexity Hotspots — start with WebGLRenderer.js, WebGLTextures.js, REDACTED. — One of this dimension's main actionable groups (71 warning-level).

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

D16 · Bus Factor9.1 / 10Exemplary✓ 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 9.1 / 10 · rule-coverage 100% · ceiling Documented

42 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is tsl/js/code/CodeCompiler.js. Counted over 486 of the 905 production source files in this repository: 416 are under the ~2,400-byte size floor this dimension measures over, and the remaining 3 have no attributable history left to measure.

Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D19 · Documentation QualityStrong◐ 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 Strong / 10 · rule-coverage 100% · ceiling Documented

The repository's root README is a clear overview of three.js (JavaScript 3D library) with links to examples, docs, manual, migration guide, Stack Overflow, and the Discord community. The devtools/README.md documents a Chrome DevTools extension for inspecting three.js applications, covering installation, features like scenes, objects, renderers, how it works, files, and message flow; its outline is complete. All READMEs document their own directories (e.g., examples/fonts/, examples/sounds/) rather than the repository as a whole, so no root-level overview/contribution/guidance defect applies. The quality is high with only minor internal-focused jargon present in clipped documents. The repository's README files and architecture/Docs markdown files are well documented: the 34 READMEs (each for a subdirectory) describe their own directories clearly with screenshots, descriptions, and license info; the 1673 architecture/design docs cover the project thoroughly. However, the visible subset is an examples directory slice rather than the root repository, so the overview, installation/build, usage/contribution, and licence of the root README are not shown here.

Documentation: no project overview · ×3README.md

What to do

  1. Resolve the 3 Documentation finding(s) in Documentation Quality — start with README.md (3). — One of this dimension's main actionable groups (3 recommendation-level).

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

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_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.

D22 · Internal API ConsistencyStronggated by 2 serious findings◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

2 API inconsistencies across a 400-member sample of 264 exposed types.

Inconsistent state persistence API. ArcballControls exposes `saveState()`, `pasteState()`, and `copyState()`, while OrbitControls only exposes `saveState()` and lacks corresponding retrieval methods (`pasteState`/`copyState`). This forces consumers to use different patterns for similar functionality across control types.
Inconsistent deserialization naming. `ArcballControls` uses `setStateFromJSON` while `NURBSCurve` uses `fromJSON`. While the domains differ (runtime state vs object construction), the inconsistency in verb choice (`setState` vs `from`) is notable in a unified API.

What to do

  1. Resolve the 1 Inconsistent state persistence API. ArcballControls exposes… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Inconsistent deserialization naming. `ArcballControls` uses… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.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 2 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)0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

62 finding(s): 0 critical, 62 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 7 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (7 issue-level).
  2. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)0.6 / 10Critical✓ 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 0.6 / 10 · rule-coverage 100% · ceiling Documented

63 finding(s): 0 critical, 4 high, 35 medium, 24 low. semgrep hit a parse error in 298 file(s) — `docs/pages/AONode.html` (line 23, line 45), `docs/pages/AfterImageNode.html` (line 24, line 54), `docs/pages/AnalyticLightNode.html` (line 109), `docs/pages/AnimationClip.html` (line 20, line 92, line 168, …), `docs/pages/AnimationClipCreator.html` (line 26), … (+293 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. 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 2 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

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

What to do

  1. Resolve the 21 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6), REDACTED (5), REDACTED (5). — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D30 · Dependency Vulnerabilities9.3 / 10Adequategated by 1 critical finding✓ 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 9.3 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED

What to do

  1. Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. 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.7 / 10Adequategated by 1 critical finding✓ 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.7 / 10 · rule-coverage 100% · ceiling Documented

14 of 489 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is editor/js/libs/ternjs/infer.js. Counted over 489 of the 905 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgeeditor/js/libs/ternjs/infer.js:1
Orphaned file · ×13manual/resources/tools/geo-picking/shapefile.js:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with infer.js. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 13 Orphaned file finding(s) in Knowledge Freshness — start with shapefile.js, WebGLBindingStates.js, threejs-materials.js. — One of this dimension's main actionable groups (13 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.8 / 10Stronggated by 8 serious 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.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: constants.js↔colorspace_pars_fragment.glsl.js 80%; lights_physical_pars_fragment.glsl.js↔meshphysical.glsl.js 79%; Bindings.js↔SampledTexture.js 64%

Change coupling: constants.js ↔ colorspace_pars_fragment.glsl.js · ×8src/constants.js:1

What to do

  1. Resolve the 8 Change coupling finding(s) in Change Coupling — start with constants.js, lights_physical_pars_fragment.glsl.js, Bindings.js. — One of this dimension's main actionable groups (8 warning-level).

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.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.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×37) — REDACTED:189, REDACTED:308, REDACTED:352, …
  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×3) — manual/pages/cameras.html:550, manual/pages/custom-buffergeometry.html:436, manual/pages/fog.html:268

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels7.8 / 10Strong✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×2) — manual/index.html:34, REDACTED:322
  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×3) — manual/pages/custom-buffergeometry.html:435, manual/pages/fundamentals.html:437, manual/pages/fundamentals.html:438
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — tsl/index.html:65, tsl/index.html:94

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure3.9 / 10Weak✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — devtools/panel/panel.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×9) — devtools/panel/panel.html:2, editor/index.html:2, manual/index.html:2, …
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. (×9) — editor/index.html:6, editor/js/libs/app/index.html:7, manual/index.html:6, …
  • An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label. (×21) — manual/index.html:43, REDACTED:181, REDACTED:254, …

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. — manual/pages/game.html:1920
  • The repo's own CSS styles .tsl-project-name with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×2) — tsl/js/managers/ProjectsManager.js:662, tsl/js/managers/ProjectsManager.js:752

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC6 · Visual & motion safety5.7 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `#panel #filterInput` sets color: #bbb on background-color: #bbb — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — files/main.css:250
  • `#tabs span.selected` sets color: #888 on background-color: #eee — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — editor/css/main.css:572
  • `.sidebar-search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tsl/css/guide.css:1998
  • `.playground-tab-rename-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tsl/css/guide.css:2514
  • `.playground-tab-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tsl/css/guide.css:2531
  • `.playground-tab-btn:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tsl/css/guide.css:2538
  • `.tsl-project-rename-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tsl/css/guide.css:4416
  • `#panel #filterInput` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — files/main.css:256
  • `#panel #language:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — files/main.css:289
  • `.CodeMirror-scroll` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — editor/js/libs/codemirror/codemirror.css:165
  • `.CodeMirror-vscrollbar` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — editor/js/libs/codemirror/codemirror.css:181
  • `.CodeMirror-code` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — editor/js/libs/codemirror/codemirror.css:279
  • `.CodeMirror-dialog input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — editor/js/libs/codemirror/addon/dialog.css:23
  • `.TextArea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — editor/css/main.css:51
  • `.Button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — editor/css/main.css:280
  • `.Select` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — editor/css/main.css:310
  • `.Outliner` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — editor/css/main.css:616
  • `.page-transition` moves (`animation: fadeIn 0.3s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:273
  • `.sidebar` moves (`transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — tsl/css/guide.css:547, tsl/css/guide.css:3659
  • `.toc-chevron` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:643
  • `#editor-console` moves (`transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:1822
  • `.sidebar-search-icon` moves (`transition: color 0.15s ease, left 0.25s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:2019
  • `.playground-custom-scrollbar` moves (`transition: height 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:2367
  • `.tsl-embed-lock-circle` moves (`transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:2701
  • `.guide-ai-chevron` moves (`transition: transform 0.25s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:3135
  • `.tsl-api-class-chevron` moves (`transition: transform 0.25s ease, color 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:3273
  • `.x-tweet-card` moves (`transition: border-color 0.25s, transform 0.25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:3549
  • `.loading-screen::before` moves (`animation: forward-zoom 12s cubic-bezier(0.1, 0.7, 0.3, 1) infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:3696
  • `.loading-spinner` moves (`animation: rotate 2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:3718
  • `.tsl-modal-container` moves (`animation: tslModalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:4088
  • `.tsl-btn` moves (`transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s, transform 0.1s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tsl/css/guide.css:4172
  • `#projects a img` moves (`transition: 0.15s transform`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — files/main.css:499
  • `#contentWrapper` moves (`transition: .25s transform`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — files/main.css:666

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 81 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition10.0 / 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.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `_onChangeCallback` has an empty body — confirm it's an intentional no-op and not an unfinished method. (×4) — build/three.core.js:4763, build/three.core.js:11755, src/math/Euler.js:427, …
  • A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead. (×2) — build/three.core.js:34545, src/extras/lib/earcut.js:1
  • `_setValue_unavailable` has an empty body — confirm it's an intentional no-op and not an unfinished method. (×2) — build/three.core.js:53781, REDACTED:328

What to do

  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
M1 · Documentation (README)5.2 / 10Adequate✓ 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.

  • 512 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 1 of 1 project(s) that lack one — worth up to 2 pts.
  • Review the README against recent changes; refresh the parts that drifted.
M2 · Architecture documentation5.0 / 10Adequate✓ 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 your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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.

  • docs/pages/ClusteredLighting.html.md links to `Lighting.html#createNode`, but `docs/pages/Lighting.html` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/pages/ClusteredLighting.html.md:68
  • docs/pages/DynamicLighting.html.md links to `Lighting.html#createNode`, but `docs/pages/Lighting.html` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/pages/DynamicLighting.html.md:72

What to do

  • Reconcile the README with reality: docs/pages/ClusteredLighting.html.md links to `Lighting.html#createNode`, but `docs/pages/Lighting.html` does not exist; docs/pages/DynamicLighting.html.md links to `Lighting.html#createNode`, but `docs/pages/Lighting.html` does not exist.
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.

P2 · Observability5.5 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Consider OpenTelemetry tracing/metrics (@opentelemetry/sdk-node) and a health-check endpoint (@godaddy/terminus or a /health route) for operability.
P3 · Security & performance tooling7.0 / 10Strong✓ 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.

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×4) — editor/js/Script.js:312, REDACTED:229, REDACTED:648, …

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
PF3 · Async & latency hygiene8.5 / 10Strong✓ 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, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `unzipSync` in `handleZIP` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — editor/js/Loader.js:974

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 Safety0.0 / 10Critical✓ 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.

  • 0 typed · 1209 plain JS — the untyped files are devtools/background.js, devtools/bridge.js, devtools/constants.js, devtools/content-script.js, devtools/devtools.js, devtools/highlight.js (+1203 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication8.9 / 10Strong✓ 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.

  • docs/ and utils/docs/template/static/ are near-verbatim copies of each other: 9 files are byte-identical under the same relative paths (~4155 lines; the trees hold 1674 and 10 files). That is one structural fact, not 9 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — docs/scripts/highlight.min.js:1
  • 61 duplicated blocks under src/ have copies in at least two of the sibling directories audio, cameras, core, extras, geometries, helpers (+8 more sibling(s) not listed) — 27 of them are reported below, and 34 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 61 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 61 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 61 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/extras/PMREMGenerator.js:22
  • 44 duplicated blocks under src/renderers/ have copies in at least two of the sibling directories common, webgl, webgl-fallback, webgpu, webxr — 34 of them are reported below, and 10 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 44 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 44 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 44 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/renderers/webgl-fallback/utils/WebGLUtils.js:55
  • 23 duplicated blocks under src/nodes/ have copies in at least two of the sibling directories accessors, code, core, display, functions, gpgpu (+4 more sibling(s) not listed) — 4 of them are reported below, and 19 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 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 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 23 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/nodes/core/StackNode.js:32
  • 15 duplicated blocks under the repository root have copies in at least two of the sibling directories devtools, editor, manual, src, tsl, utils — 4 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 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 15 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. — devtools/panel/panel.js:181
  • src/extras/PMREMGenerator.js:22 · src/renderers/common/extras/PMREMGenerator.js:33 — the two spans are one implementation copied and then locally edited — 1488 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/PMREMGenerator.js:22
  • src/renderers/WebGLRenderer.js:3383 · src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:867 — the two spans are one implementation copied and then locally edited — 1155 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/renderers/WebGLRenderer.js:3383
  • src/renderers/webgl-fallback/utils/WebGLUtils.js:55 · src/renderers/webgl/WebGLUtils.js:8 — the two spans are one implementation copied and then locally edited — 1199 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/renderers/webgl-fallback/utils/WebGLUtils.js:55
  • src/core/BufferAttribute.js:312 · src/core/InterleavedBufferAttribute.js:125 — the two spans are one implementation copied and then locally edited — 732 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/BufferAttribute.js:312
  • editor/js/libs/ui.js:533 · editor/js/libs/ui.js:754 — 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. — editor/js/libs/ui.js:533
  • src/renderers/common/XRManager.js:1676 · src/renderers/webxr/WebXRManager.js:570 — the two spans are one implementation copied and then locally edited — 564 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/renderers/common/XRManager.js:1676
  • tsl/js/imports/scripts/scenes/empty.js:1 · tsl/js/imports/scripts/scenes/plane.js:1 — these 2 files are line-for-line copies of one another — 76 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. — tsl/js/imports/scripts/scenes/empty.js:1
  • src/nodes/accessors/ReferenceBaseNode.js:17 · src/nodes/accessors/ReferenceNode.js:22 — the two spans are one implementation copied and then locally edited — 424 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/nodes/accessors/ReferenceBaseNode.js:17
  • src/materials/nodes/MeshPhongNodeMaterial.js:30 · src/materials/nodes/MeshStandardNodeMaterial.js:32 — 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. — src/materials/nodes/MeshPhongNodeMaterial.js:30
  • src/materials/MeshLambertMaterial.js:1 · src/materials/MeshPhongMaterial.js:1 · src/materials/MeshStandardMaterial.js:2 — these 3 files are line-for-line copies of one another — 64 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/materials/MeshLambertMaterial.js:1
  • src/renderers/common/XRManager.js:909 · src/renderers/common/XRManager.js:1004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/renderers/common/XRManager.js:909
  • src/math/Plane.js:21 · src/math/Sphere.js:20 — the two spans are one implementation copied and then locally edited — 281 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/math/Plane.js:21
  • src/nodes/accessors/Morph.js:109 · src/renderers/webgl/WebGLMorphtargets.js:28 — the two spans are one implementation copied and then locally edited — 470 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/nodes/accessors/Morph.js:109
  • src/objects/Line.js:170 · src/objects/Points.js:108 — the two spans are one implementation copied and then locally edited — 460 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/objects/Line.js:170
  • src/renderers/common/XRManager.js:1239 · src/renderers/webxr/WebXRManager.js:477 — the two spans are one implementation copied and then locally edited — 403 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/renderers/common/XRManager.js:1239
  • editor/js/Loader.js:238 · editor/js/Loader.js:560 — the two spans are one implementation copied and then locally edited — 297 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. — editor/js/Loader.js:238
  • src/cameras/OrthographicCamera.js:112 · src/cameras/PerspectiveCamera.js:129 — the two spans are one implementation copied and then locally edited — 348 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/cameras/OrthographicCamera.js:112
  • src/math/Vector3.js:230 · src/math/Vector4.js:291 — 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/math/Vector3.js:230
  • src/math/Euler.js:49 · src/math/Quaternion.js:161 — 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/math/Euler.js:49
  • src/renderers/WebGLRenderer.js:1873 · src/renderers/common/Renderer.js:3532 — the two spans are one implementation copied and then locally edited — 386 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/renderers/WebGLRenderer.js:1873
  • src/extras/curves/LineCurve.js:9 · src/extras/curves/LineCurve3.js:9 — 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. — src/extras/curves/LineCurve.js:9
  • editor/js/Sidebar.Scene.js:175 · editor/js/Sidebar.Scene.js:278 — the two spans are one implementation copied and then locally edited — 372 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. — editor/js/Sidebar.Scene.js:175
  • src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js:91 · src/renderers/webgl/WebGLAttributes.js:16 — the two spans are one implementation copied and then locally edited — 302 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/renderers/webgl-fallback/utils/WebGLAttributeUtils.js:91
  • editor/js/commands/SetPositionCommand.js:4 · editor/js/commands/SetRotationCommand.js:4 · editor/js/commands/SetScaleCommand.js:4 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — editor/js/commands/SetPositionCommand.js:4
  • REDACTED:757 · REDACTED:1068 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:757
  • tsl/js/utils/MarkdownUtils.js:648 · tsl/js/utils/MarkdownUtils.js:691 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — tsl/js/utils/MarkdownUtils.js:648
  • editor/js/commands/SetMaterialColorCommand.js:3 · editor/js/commands/SetMaterialVectorCommand.js:3 — 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. — editor/js/commands/SetMaterialColorCommand.js:3
  • src/extras/curves/CubicBezierCurve.js:27 · src/extras/curves/CubicBezierCurve3.js:10 — 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/extras/curves/CubicBezierCurve.js:27
  • src/extras/curves/QuadraticBezierCurve.js:26 · src/extras/curves/QuadraticBezierCurve3.js:10 — 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. — src/extras/curves/QuadraticBezierCurve.js:26
  • src/nodes/core/NodeFrame.js:212 · src/nodes/core/NodeFrame.js:261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/nodes/core/NodeFrame.js:212
  • src/renderers/WebGLCubeRenderTarget.js:15 · src/renderers/common/CubeRenderTarget.js:20 — the two spans are one implementation copied and then locally edited — 322 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/renderers/WebGLCubeRenderTarget.js:15
  • src/nodes/accessors/Camera.js:85 · src/nodes/accessors/Camera.js:131 · src/nodes/accessors/Camera.js:177 · src/nodes/accessors/Camera.js:223 · +1 more site(s) not listed — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. — src/nodes/accessors/Camera.js:85
  • src/renderers/webgl-fallback/utils/WebGLState.js:501 · src/renderers/webgl/WebGLState.js:640 — 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/renderers/webgl-fallback/utils/WebGLState.js:501
  • src/renderers/webgl-fallback/utils/WebGLState.js:1419 · src/renderers/webgl/WebGLState.js:1217 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — src/renderers/webgl-fallback/utils/WebGLState.js:1419
  • src/renderers/webgpu/nodes/WGSLNodeBuilder.js:423 · src/renderers/webgpu/nodes/WGSLNodeBuilder.js:1111 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/renderers/webgpu/nodes/WGSLNodeBuilder.js:423

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 Complexity3.0 / 10Weak✓ 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.

  • WebGLProgram has cyclomatic complexity 178 and cognitive complexity 340; 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/renderers/webgl/WebGLProgram.js:371
  • fromJSON has cyclomatic complexity 164 and cognitive complexity 166; 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/materials/Material.js:920
  • parseBlock has cyclomatic complexity 161 and cognitive complexity 20; 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. — examples/jsm/loaders/lwo/LWO2Parser.js:9
  • parseBlock has cyclomatic complexity 145 and cognitive complexity 19; 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. — examples/jsm/loaders/lwo/LWO3Parser.js:9
  • setProgram has cyclomatic complexity 128 and cognitive complexity 142; 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/renderers/WebGLRenderer.js:2411
  • convert has cyclomatic complexity 126 and cognitive complexity 256; 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. (×2) — src/renderers/webgl-fallback/utils/WebGLUtils.js:51, src/renderers/webgl/WebGLUtils.js:6
  • toJSON has cyclomatic complexity 116 and cognitive complexity 118; 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/materials/Material.js:610
  • getFormat has cyclomatic complexity 115 and cognitive complexity 138; 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/renderers/webgpu/utils/WebGPUTextureUtils.js:1481
  • getParameters has cyclomatic complexity 100 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 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/renderers/webgl/WebGLPrograms.js:54
  • getInternalFormat has cyclomatic complexity 93 and cognitive complexity 156; 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/renderers/webgl-fallback/utils/WebGLTextureUtils.js:165
  • parseObject has cyclomatic complexity 93 and cognitive complexity 125; 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/loaders/ObjectLoader.js:784
  • toRGBA8 has cyclomatic complexity 82 and cognitive complexity 196; 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. — examples/jsm/libs/utif.module.js:1300
  • _buildGeometryWithSubsets has cyclomatic complexity 80 and cognitive complexity 107; 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. — examples/jsm/loaders/usd/USDComposer.js:1922
  • uploadTexture has cyclomatic complexity 79 and cognitive complexity 315; 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/renderers/webgl/WebGLTextures.js:962
  • getCallDetail has cyclomatic complexity 78 and cognitive complexity 72; 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. — examples/jsm/inspector/tabs/Timeline.js:852
  • equals has cyclomatic complexity 76 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/materials/nodes/manager/NodeMaterialObserver.js:597
  • getInternalFormat has cyclomatic complexity 74 and cognitive complexity 119; 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/renderers/webgl/WebGLTextures.js:132
  • load has cyclomatic complexity 72 and cognitive complexity 84; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1903
  • parse has cyclomatic complexity 67 and cognitive complexity 95; 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. — examples/jsm/libs/utif.module.js:12

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files5.4 / 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.

  • editor/js/libs/codemirror/codemirror.js has 8884 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — editor/js/libs/codemirror/codemirror.js:1
  • src/renderers/common/Renderer.js has 3023 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/common/Renderer.js:1
  • src/nodes/core/NodeBuilder.js has 2721 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/nodes/core/NodeBuilder.js:1
  • src/renderers/WebGLRenderer.js has 2473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/WebGLRenderer.js:1
  • editor/js/Strings.js has 2423 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — editor/js/Strings.js:1
  • src/renderers/webgpu/WebGPUBackend.js has 2213 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/webgpu/WebGPUBackend.js:1
  • src/renderers/webgpu/nodes/WGSLNodeBuilder.js has 1900 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/webgpu/nodes/WGSLNodeBuilder.js:1
  • src/renderers/webgl-fallback/WebGLBackend.js has 1865 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/webgl-fallback/WebGLBackend.js:1
  • REDACTED has 1718 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 1598 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • editor/js/libs/ternjs/infer.js has 1497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — editor/js/libs/ternjs/infer.js:1
  • src/renderers/webgl/WebGLTextures.js has 1442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/webgl/WebGLTextures.js:1
  • src/renderers/common/XRManager.js has 1408 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/common/XRManager.js:1
  • src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js has 1323 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:1
  • src/renderers/webgpu/utils/WebGPUTextureUtils.js has 1320 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/webgpu/utils/WebGPUTextureUtils.js:1
  • src/core/Object3D.js has 1244 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/Object3D.js:1
  • src/objects/BatchedMesh.js has 1209 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/objects/BatchedMesh.js:1
  • src/renderers/webgl-fallback/utils/WebGLState.js has 1046 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/webgl-fallback/utils/WebGLState.js:1
  • src/nodes/materialx/MaterialXNoise.js has 1042 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/nodes/materialx/MaterialXNoise.js:1
  • src/nodes/core/Node.js has 1039 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/nodes/core/Node.js:1
  • src/nodes/math/MathNode.js has 1038 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/nodes/math/MathNode.js:1
  • src/math/Matrix4.js has 987 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/math/Matrix4.js:1
  • src/core/BufferGeometry.js has 977 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/BufferGeometry.js:1
  • src/materials/Material.js has 972 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/materials/Material.js:1
  • src/materials/nodes/NodeMaterial.js has 965 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/materials/nodes/NodeMaterial.js:1
  • src/math/Vector3.js has 955 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/math/Vector3.js:1
  • tsl/js/code/CodeCompiler.js has 942 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tsl/js/code/CodeCompiler.js:1
  • tsl/js/utils/MarkdownUtils.js has 938 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tsl/js/utils/MarkdownUtils.js:1
  • manual/resources/threejs-primitives.js has 930 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — manual/resources/threejs-primitives.js:1
  • src/renderers/webgl-fallback/utils/WebGLTextureUtils.js has 919 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:1
  • editor/js/libs/ternjs/tern.js has 881 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — editor/js/libs/ternjs/tern.js:1
  • src/nodes/display/PassNode.js has 851 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/nodes/display/PassNode.js:1
  • tsl/js/managers/PlaygroundManager.js has 836 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tsl/js/managers/PlaygroundManager.js:1
  • src/renderers/webgl/WebGLState.js has 811 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/webgl/WebGLState.js:1
  • src/renderers/common/nodes/NodeManager.js has 806 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderers/common/nodes/NodeManager.js:1
  • src/nodes/accessors/TextureNode.js has 799 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/nodes/accessors/TextureNode.js:1
  • src/math/Vector4.js has 797 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/math/Vector4.js:1
  • src/loaders/ObjectLoader.js has 795 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/loaders/ObjectLoader.js:1
  • src/core/BufferAttribute.js has 789 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/BufferAttribute.js:1
  • src/nodes/tsl/TSLCore.js has 763 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/nodes/tsl/TSLCore.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage8.8 / 10Strong✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — editor/js/libs/codemirror/codemirror.js:1, editor/js/Strings.js:1, REDACTED:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness10.0 / 10Exemplary✓ 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.

R6 · Tooling6.7 / 10Adequate✓ 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.

  • test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
R7 · Dead Code9.9 / 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 1570 application, 4 tooling and 294 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 (1570 application, 4 tooling, 294 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 (×7) — utils/generateDFGLUT.js, utils/packLDrawModel.mjs, tsl/js/imports/scripts/scenes/shaderball.js, …

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 Hygiene5.5 / 10Adequate✓ 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.

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — editor/js/libs/ternjs/doc_comment.js:8, tsl/js/utils/MarkdownUtils.js:1
  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.

S1 · Web-Security Posture6.0 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository. Its Node HTTP listeners were read for HTTPS enforcement alone — TLS served, a redirect to https:// or HSTS, or a TLS-terminating proxy configuration committed beside the server — each judged per server package.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `https://cdn.jsdelivr.net/gh/google/draco@1.5.7/javascript/draco_encoder.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. — editor/index.html:29
  • `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) (×2) — utils/server.js:197, utils/server.js:216

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
  • Enforce HTTPS on each listed server: serve TLS itself, or redirect plain requests to `https://` and send `Strict-Transport-Security` (`helmet()` does by default) behind the TLS-terminating proxy — and commit that proxy's configuration beside the service. A server only this machine reaches should bind `127.0.0.1`.
X1 · Async correctness7.1 / 10Strong✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it. (×10) — build/three.webgpu.nodes.js:63853, build/three.webgpu.nodes.js:88129, build/three.webgpu.nodes.js:88290, …

What to do

  • `async` Promise executor
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `struct` is exported and takes `membersLayout: object` from its caller, and it calls itself at line 137 (`struct`) with a piece of `membersLayout` — and nowhere in `struct` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `struct` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/nodes/core/StructNode.js:137

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 0/4 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `loadThreeDefs` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — editor/js/Script.js:304
  • `load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — REDACTED:225, REDACTED:584
  • `showImportedFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — tsl/js/managers/PlaygroundManager.js:1182

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped5.1 / 10Adequate✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `title` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — devtools/panel/panel.js:578
  • `getObjectType(object)` is text this program did not author, and it is written into a quoted attribute value through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — editor/js/Sidebar.Scene.js:102
  • `'&nbsp;'+object.name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — editor/js/Sidebar.Settings.History.js:97, editor/js/Sidebar.Settings.History.js:113
  • `template` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — editor/js/libs/codemirror/addon/dialog.js:24
  • `options[key]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — editor/js/libs/ui.js:412
  • `text` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — manual/resources/lesson.js:30, manual/resources/threejs-primitives.js:893
  • `sourceCodeHtml` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:1475
  • `num` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:368
  • `node.searchSnippet` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:2226, REDACTED:2320
  • `iconName` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×3) — REDACTED:2436, REDACTED:2448, REDACTED:2459
  • `t.name` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — tsl/js/managers/ProjectsManager.js:655, tsl/js/managers/ProjectsManager.js:747
  • `project.name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — tsl/js/managers/ProjectsManager.js:752
  • `dateStr` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — tsl/js/managers/ProjectsManager.js:759
  • `safeUrl` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — tsl/js/utils/MarkdownUtils.js:1259
  • `safeHref` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — utils/server.js:90

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
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, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

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

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling5.1 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×21) — devtools/content-script.js:22, devtools/background.js:42, editor/js/Sidebar.Material.MapProperty.js:130, …
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×6) — devtools/background.js:20, devtools/background.js:21, devtools/background.js:22, …
  • `.catch(function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — manual/resources/tools/geo-picking/shapefile.js:441

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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 Health36%Weak — gated by D1, D2, R1, R2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture87%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity70%StrongSolid.
Readiness41%Weak — gated by D9, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security60%Adequate — gated by D28, D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility28%Weak — gated by AC1, AC3, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance85%StrongStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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.

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 55 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.

  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server (no Express, Fastify, Koa, Hono, NestJS or similar app, no Next.js/SvelteKit/Nuxt server route, no edge function), creates no Supabase tables and talks to no hosted backend. Access control is therefore N/A here — a browser application or library is authorized by the server it calls, not by itself; a client-side route guard hides a page and authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
  • D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
  • D12 Dependency Hygiene — Dependency currency not established — this repository declares no production dependency to grade
  • D14 License Compliance — Vendored third-party code's licences not graded — D14 grades declared npm dependencies only
  • D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
  • 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.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. 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 — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.html,.js), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 7 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D4 Code Duplication — Duplication not measured — .html not exposed to the token comparison
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • 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
  • D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • 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 — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • 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.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — Not applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Plain JavaScript carries no type annotations and commits no tsconfig, so it states no null-typed discipline for this check to grade: there is nothing here that switches null checking on or off, and TypeScript (or `// @ts-check`) is how a repository acquires one — advice, not a defect this card measures. Not a gap in the analyzer and not a finding about your code.
  • 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 — 93 finding(s)
AC1 · Text alternatives · <img> without a text alternative · ×37
  • <img> without a text alternative REDACTED:189 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:308 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:352 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/backgrounds.html:139 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/backgrounds.html:140 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/backgrounds.html:141 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/backgrounds.html:144 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/backgrounds.html:145 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/backgrounds.html:146 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/backgrounds.html:217 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/billboards.html:77 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/cameras.html:57 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/cameras.html:333 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/cameras.html:544 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/custom-buffergeometry.html:34 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/custom-buffergeometry.html:41 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/debugging-glsl.html:59 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/debugging-glsl.html:68 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/debugging-glsl.html:87 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/debugging-javascript.html:47 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/debugging-javascript.html:51 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/debugging-javascript.html:55 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/debugging-javascript.html:58 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/debugging-javascript.html:76 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative manual/pages/debugging-javascript.html:79 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • + 12 more in this group — see findings.md.
AC3 · Page structure · <iframe> without a title · ×21
  • <iframe> without a title manual/index.html:43 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title REDACTED:181 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title REDACTED:254 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title REDACTED:339 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title REDACTED:502 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title REDACTED:695 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/backgrounds.html:60 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/backgrounds.html:77 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/backgrounds.html:113 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/backgrounds.html:208 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/backgrounds.html:242 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/billboards.html:70 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/billboards.html:96 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/billboards.html:166 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/billboards.html:293 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/cameras.html:101 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/cameras.html:273 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/cameras.html:325 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/cameras.html:347 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/cameras.html:417 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title manual/pages/cameras.html:536 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
AC3 · Page structure · Viewport restricts zoom · ×9
  • Viewport restricts zoom editor/index.html:6 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom editor/js/libs/app/index.html:7 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom manual/index.html:6 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom REDACTED:4 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom manual/pages/animation-system.html:4 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom manual/pages/backgrounds.html:4 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom manual/pages/billboards.html:4 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom manual/pages/cameras.html:4 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom manual/pages/canvas-textures.html:4 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
D28 · Secrets (history) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Link with no accessible name · ×3
  • Link with no accessible name manual/pages/custom-buffergeometry.html:435 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name manual/pages/fundamentals.html:437 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name manual/pages/fundamentals.html:438 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×2
  • <input> without a programmatic label manual/index.html:34 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label REDACTED:322 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text tsl/index.html:65 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text tsl/index.html:94 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×2
  • Clickable element isn't keyboard-operable tsl/js/managers/ProjectsManager.js:662 — The repo's own CSS styles .tsl-project-name with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable tsl/js/managers/ProjectsManager.js:752 — The repo's own CSS styles .tsl-project-name with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang devtools/panel/panel.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge editor/js/libs/ternjs/infer.js:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
R8 · Dependency Hygiene · Unlisted import 'acorn' · ×1
  • Unlisted import 'acorn' editor/js/libs/ternjs/doc_comment.js:8 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'marked' · ×1
  • Unlisted import 'marked' tsl/js/utils/MarkdownUtils.js:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Serious — 1309 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×71
  • Hotspot: src/renderers/WebGLRenderer.js src/renderers/WebGLRenderer.js:71 — src/renderers/WebGLRenderer.js changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 459 in WebGLRenderer.constructor at line 71. 2 of those changes were fix/bug commits, and the other 17 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/WebGLRenderer.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/renderers/webgl/WebGLTextures.js src/renderers/webgl/WebGLTextures.js:7 — src/renderers/webgl/WebGLTextures.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 444 in WebGLTextures.WebGLTextures at line 7. 1 of those changes was a fix/bug commit, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/webgl/WebGLTextures.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: REDACTED REDACTED:147 — REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 273 in SVGLoader.parse at line 147. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- REDACTED`: 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/renderers/webgl-fallback/WebGLBackend.js src/renderers/webgl-fallback/WebGLBackend.js:2299 — src/renderers/webgl-fallback/WebGLBackend.js changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in WebGLBackend._setFramebuffer at line 2299. 7 of those changes were fix/bug commits, and the other 20 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/webgl-fallback/WebGLBackend.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/materials/nodes/manager/NodeMaterialObserver.js src/materials/nodes/manager/NodeMaterialObserver.js:597 — src/materials/nodes/manager/NodeMaterialObserver.js changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in NodeMaterialObserver.equals at line 597. 2 of those changes were fix/bug commits, and the other 15 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/materials/nodes/manager/NodeMaterialObserver.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/loaders/ObjectLoader.js src/loaders/ObjectLoader.js:784 — src/loaders/ObjectLoader.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 102 in ObjectLoader.parseObject at line 784. 1 of those changes was a fix/bug commit, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/loaders/ObjectLoader.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/renderers/webgl/WebGLProgram.js src/renderers/webgl/WebGLProgram.js:371 — src/renderers/webgl/WebGLProgram.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 191 in WebGLProgram.WebGLProgram at line 371. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/webgl/WebGLProgram.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/renderers/webgpu/WebGPUBackend.js src/renderers/webgpu/WebGPUBackend.js:2402 — src/renderers/webgpu/WebGPUBackend.js changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in WebGPUBackend.needsRenderUpdate at line 2402. 7 of those changes were fix/bug commits, and the other 18 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/webgpu/WebGPUBackend.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/renderers/common/Renderer.js src/renderers/common/Renderer.js:1931 — src/renderers/common/Renderer.js changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Renderer._renderScene at line 1931. 8 of those changes were fix/bug commits, and the other 20 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/common/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/nodes/core/NodeBuilder.js src/nodes/core/NodeBuilder.js:1555 — src/nodes/core/NodeBuilder.js changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in NodeBuilder.generateConst at line 1555. 4 of those changes were fix/bug commits, and the other 17 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/nodes/core/NodeBuilder.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/renderers/webgpu/nodes/WGSLNodeBuilder.js src/renderers/webgpu/nodes/WGSLNodeBuilder.js:2204 — src/renderers/webgpu/nodes/WGSLNodeBuilder.js changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in WGSLNodeBuilder.getUniforms at line 2204. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/webgpu/nodes/WGSLNodeBuilder.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: examples/jsm/loaders/EXRLoader.js examples/jsm/loaders/EXRLoader.js:140 — examples/jsm/loaders/EXRLoader.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 340 in EXRLoader.parse at line 140. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- examples/jsm/loaders/EXRLoader.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/renderers/webgl/WebGLPrograms.js src/renderers/webgl/WebGLPrograms.js:54 — src/renderers/webgl/WebGLPrograms.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in WebGLPrograms.WebGLPrograms.getParameters at line 54. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/webgl/WebGLPrograms.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/materials/Material.js src/materials/Material.js:920 — src/materials/Material.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 164 in Material.fromJSON at line 920. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/materials/Material.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: examples/jsm/loaders/PLYLoader.js examples/jsm/loaders/PLYLoader.js:146 — examples/jsm/loaders/PLYLoader.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 157 in PLYLoader.parse at line 146. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- examples/jsm/loaders/PLYLoader.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: examples/jsm/loaders/3MFLoader.js examples/jsm/loaders/3MFLoader.js:133 — examples/jsm/loaders/3MFLoader.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 153 in ThreeMFLoader.parse at line 133. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- examples/jsm/loaders/3MFLoader.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/renderers/common/Textures.js src/renderers/common/Textures.js:276 — src/renderers/common/Textures.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in Textures.updateTexture at line 276. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/common/Textures.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: examples/jsm/loaders/materialx/MaterialXDocument.js examples/jsm/loaders/materialx/MaterialXDocument.js:577 — examples/jsm/loaders/materialx/MaterialXDocument.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in MaterialXNode.getNode at line 577. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- examples/jsm/loaders/materialx/MaterialXDocument.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/renderers/webgl-fallback/utils/WebGLTextureUtils.js src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:857 — src/renderers/webgl-fallback/utils/WebGLTextureUtils.js changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in WebGLTextureUtils.copyTextureToTexture at line 857. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/webgl-fallback/utils/WebGLTextureUtils.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/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:935 — src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in GLSLNodeBuilder.getUniforms at line 935. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.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/nodes/core/Node.js src/nodes/core/Node.js:1122 — src/nodes/core/Node.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in Node.build at line 1122. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/nodes/core/Node.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: REDACTED REDACTED:245 — REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in Guide.init at line 245. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- REDACTED`: 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/renderers/webgpu/utils/WebGPUTextureUtils.js src/renderers/webgpu/utils/WebGPUTextureUtils.js:302 — src/renderers/webgpu/utils/WebGPUTextureUtils.js changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in WebGPUTextureUtils.createTexture at line 302. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/webgpu/utils/WebGPUTextureUtils.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: examples/jsm/inspector/tabs/Viewer.js examples/jsm/inspector/tabs/Viewer.js:943 — examples/jsm/inspector/tabs/Viewer.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in Viewer.update at line 943. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- examples/jsm/inspector/tabs/Viewer.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/renderers/common/Bindings.js src/renderers/common/Bindings.js:450 — src/renderers/common/Bindings.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in Bindings._update at line 450. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 10:36:41 +02:00' --until='2026-10-24 10:36:41 +02:00' --full-history --no-merges -- src/renderers/common/Bindings.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.
  • + 46 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file editor/js/libs/codemirror/codemirror.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/Strings.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/libs/ternjs/infer.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tsl/js/code/CodeCompiler.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tsl/js/utils/MarkdownUtils.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tsl/js/managers/PlaygroundManager.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/libs/ui.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file manual/resources/threejs-primitives.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/Loader.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tsl/js/editor/CodeEditor.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/Viewport.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/libs/ternjs/tern.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tsl/js/managers/ProjectsManager.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/libs/codemirror/mode/javascript.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/libs/ui.three.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/Sidebar.Object.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/Editor.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/Menubar.Render.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file editor/js/Sidebar.Material.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file utils/changelog.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×39
  • FunctionTooLong: WebGLTextures.WebGLTextures src/renderers/webgl/WebGLTextures.js:7 — FunctionTooLong — WebGLTextures runs 1068 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 968 over it, 10.68× 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: WebGLState.WebGLState src/renderers/webgl/WebGLState.js:6 — FunctionTooLong — WebGLState runs 652 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 552 over it, 6.52× 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: Loader.Loader editor/js/Loader.js:14 — FunctionTooLong — Loader runs 506 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 406 over it, 5.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: WebGLPrograms.WebGLPrograms src/renderers/webgl/WebGLPrograms.js:16 — FunctionTooLong — WebGLPrograms runs 468 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 368 over it, 4.68× 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: Viewport.Viewport editor/js/Viewport.js:25 — FunctionTooLong — Viewport runs 417 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 317 over it, 4.17× 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: Sidebar.Object.SidebarObject editor/js/Sidebar.Object.js:14 — FunctionTooLong — SidebarObject runs 371 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 271 over it, 3.71× 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: WebGLProgram.WebGLProgram src/renderers/webgl/WebGLProgram.js:371 — FunctionTooLong — WebGLProgram runs 361 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 261 over it, 3.61× 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: Animation.Animation editor/js/Animation.js:5 — FunctionTooLong — Animation runs 332 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 232 over it, 3.32× 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: codemirror.addEditorMethods editor/js/libs/codemirror/codemirror.js:8270 — FunctionTooLong — addEditorMethods runs 322 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 222 over it, 3.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Sidebar.Scene.SidebarScene editor/js/Sidebar.Scene.js:6 — FunctionTooLong — SidebarScene runs 318 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 218 over it, 3.18× 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: Menubar.Add.MenubarAdd editor/js/Menubar.Add.js:11 — FunctionTooLong — MenubarAdd 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: WebGLLights.WebGLLights src/renderers/webgl/WebGLLights.js:159 — FunctionTooLong — WebGLLights runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: WebGLBindingStates.WebGLBindingStates src/renderers/webgl/WebGLBindingStates.js:3 — FunctionTooLong — WebGLBindingStates runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.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.
  • FunctionTooLong: Sidebar.Material.SidebarMaterial editor/js/Sidebar.Material.js:15 — FunctionTooLong — SidebarMaterial runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× 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: WebGPUTextureUtils.getFormat src/renderers/webgpu/utils/WebGPUTextureUtils.js:1481 — FunctionTooLong — getFormat runs 277 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 177 over it, 2.77× 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: WebGLShadowMap.WebGLShadowMap src/renderers/webgl/WebGLShadowMap.js:35 — FunctionTooLong — WebGLShadowMap 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.
  • FunctionTooLong: Menubar.File.MenubarFile editor/js/Menubar.File.js:4 — FunctionTooLong — MenubarFile runs 272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 172 over it, 2.72× 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: WebGLMaterials.WebGLMaterials src/renderers/webgl/WebGLMaterials.js:11 — FunctionTooLong — WebGLMaterials runs 248 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 148 over it, 2.48× 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: Script.Script editor/js/Script.js:8 — FunctionTooLong — Script runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× 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: WebGLPrograms.WebGLPrograms.getParameters src/renderers/webgl/WebGLPrograms.js:54 — FunctionTooLong — WebGLPrograms.getParameters runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: WebGLLights.WebGLLights.setup src/renderers/webgl/WebGLLights.js:221 — FunctionTooLong — WebGLLights.setup runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× 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: WebGLUniformsGroups.WebGLUniformsGroups src/renderers/webgl/WebGLUniformsGroups.js:3 — FunctionTooLong — WebGLUniformsGroups runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.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.
  • FunctionTooLong: Sidebar.Geometry.SidebarGeometry editor/js/Sidebar.Geometry.js:12 — FunctionTooLong — SidebarGeometry runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× 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: publish.publish utils/docs/template/publish.js:655 — FunctionTooLong — publish runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× 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: make-geo-picking-texture.main manual/resources/tools/geo-picking/make-geo-picking-texture.js:7 — FunctionTooLong — main runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 14 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×34
  • FileTooLong: codemirror/codemirror.js editor/js/libs/codemirror/codemirror.js — FileTooLong — 6580 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 1500 significant lines; this is 5080 over it, 4.39× 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: renderers/WebGLRenderer.js src/renderers/WebGLRenderer.js — FileTooLong — 1452 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: WebGLRenderer (64-3724). The bar is 500 significant lines; this is 952 over it, 2.90× 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: REDACTED REDACTED — FileTooLong — 1383 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 883 over it, 2.77× 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: common/Renderer.js src/renderers/common/Renderer.js — FileTooLong — 1311 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: Renderer (134-4327). The bar is 500 significant lines; this is 811 over it, 2.62× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: webgpu/WebGPUBackend.js src/renderers/webgpu/WebGPUBackend.js — FileTooLong — 1291 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: WebGPUBackend (55-3331). The bar is 500 significant lines; this is 791 over it, 2.58× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ternjs/infer.js editor/js/libs/ternjs/infer.js — FileTooLong — 1162 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 662 over it, 2.32× 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: core/NodeBuilder.js src/nodes/core/NodeBuilder.js — FileTooLong — 1087 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 91% of them inside a single declaration: NodeBuilder (175-3916). The bar is 500 significant lines; this is 587 over it, 2.17× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: webgl/WebGLTextures.js src/renderers/webgl/WebGLTextures.js — FileTooLong — 1074 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: WebGLTextures (7-2569). The bar is 500 significant lines; this is 574 over it, 2.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: webgl-fallback/WebGLBackend.js src/renderers/webgl-fallback/WebGLBackend.js — FileTooLong — 986 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: WebGLBackend (28-2880). The bar is 500 significant lines; this is 486 over it, 1.97× 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: nodes/WGSLNodeBuilder.js src/renderers/webgpu/nodes/WGSLNodeBuilder.js — FileTooLong — 976 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: WGSLNodeBuilder (297-2830). The bar is 500 significant lines; this is 476 over it, 1.95× 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: materialx/MaterialXNoise.js src/nodes/materialx/MaterialXNoise.js — FileTooLong — 942 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 442 over it, 1.88× 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: utils/WebGPUTextureUtils.js src/renderers/webgpu/utils/WebGPUTextureUtils.js — FileTooLong — 916 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: WebGPUTextureUtils (91-1472). The bar is 500 significant lines; this is 416 over it, 1.83× 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: REDACTED REDACTED — FileTooLong — 875 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 375 over it, 1.75× 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: utils/MarkdownUtils.js tsl/js/utils/MarkdownUtils.js — FileTooLong — 774 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 274 over it, 1.55× 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: common/XRManager.js src/renderers/common/XRManager.js — FileTooLong — 723 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 67% of them inside a single declaration: XRManager (30-1468). The bar is 500 significant lines; this is 223 over it, 1.45× 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: resources/threejs-primitives.js manual/resources/threejs-primitives.js — FileTooLong — 723 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 223 over it, 1.45× 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: code/CodeCompiler.js tsl/js/code/CodeCompiler.js — FileTooLong — 715 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 215 over it, 1.43× 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: ternjs/tern.js editor/js/libs/ternjs/tern.js — FileTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 205 over it, 1.41× 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: nodes/GLSLNodeBuilder.js src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js — FileTooLong — 688 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: GLSLNodeBuilder (174-1970). 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: objects/BatchedMesh.js src/objects/BatchedMesh.js — FileTooLong — 681 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 89% of them inside a single declaration: BatchedMesh (187-1736). The bar is 500 significant lines; this is 181 over it, 1.36× 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: managers/PlaygroundManager.js tsl/js/managers/PlaygroundManager.js — FileTooLong — 670 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: PlaygroundManager (6-1341). The bar is 500 significant lines; this is 170 over it, 1.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: webgl/WebGLState.js src/renderers/webgl/WebGLState.js — FileTooLong — 657 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: WebGLState (6-1372). 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: utils/WebGLState.js src/renderers/webgl-fallback/utils/WebGLState.js — FileTooLong — 615 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: WebGLState (27-1530). The bar is 500 significant lines; this is 115 over it, 1.23× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: loaders/ObjectLoader.js src/loaders/ObjectLoader.js — FileTooLong — 614 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: ObjectLoader (85-1302). The bar is 500 significant lines; this is 114 over it, 1.23× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: utils/WebGLTextureUtils.js src/renderers/webgl-fallback/utils/WebGLTextureUtils.js — FileTooLong — 613 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: WebGLTextureUtils (13-1419). The bar is 500 significant lines; this is 113 over it, 1.23× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • + 9 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×33
  • MethodTooLong: WebGLRenderer.constructor src/renderers/WebGLRenderer.js:71 — MethodTooLong — constructor runs 1384 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1284 over it, 13.84× 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: WebXRManager.constructor src/renderers/webxr/WebXRManager.js:33 — MethodTooLong — constructor runs 372 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 272 over it, 3.72× 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: ObjectLoader.parseObject src/loaders/ObjectLoader.js:784 — MethodTooLong — parseObject runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.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: PlaygroundManager.renderPlaygroundTabs tsl/js/managers/PlaygroundManager.js:273 — MethodTooLong — renderPlaygroundTabs runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× 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: EditorControls.constructor editor/js/EditorControls.js:5 — MethodTooLong — constructor runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.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: Material.toJSON src/materials/Material.js:610 — MethodTooLong — toJSON runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× 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: CodeRunner.run REDACTED:897 — MethodTooLong — run runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NodeMaterialObserver.equals src/materials/nodes/manager/NodeMaterialObserver.js:597 — MethodTooLong — equals runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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: WebGLBackend._setFramebuffer src/renderers/webgl-fallback/WebGLBackend.js:2299 — MethodTooLong — _setFramebuffer runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RenderVideoDialog.constructor editor/js/Menubar.Render.js:342 — MethodTooLong — constructor runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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: LayoutManager.setupResizer tsl/js/managers/LayoutManager.js:116 — MethodTooLong — setupResizer runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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: MaterialNode.setup src/nodes/accessors/MaterialNode.js:120 — MethodTooLong — setup runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× 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: Object3D.toJSON src/core/Object3D.js:1294 — MethodTooLong — toJSON runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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: Material.fromJSON src/materials/Material.js:920 — MethodTooLong — fromJSON runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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: RenderImageDialog.constructor editor/js/Menubar.Render.js:76 — MethodTooLong — constructor 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.
  • MethodTooLong: Renderer._renderScene src/renderers/common/Renderer.js:1931 — MethodTooLong — _renderScene runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× 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: CodeRunner.load REDACTED:584 — MethodTooLong — load runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WebGPUPipelineUtils.createRenderPipeline src/renderers/webgpu/utils/WebGPUPipelineUtils.js:71 — MethodTooLong — createRenderPipeline runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× 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: PolyhedronGeometry.constructor src/geometries/PolyhedronGeometry.js:23 — MethodTooLong — constructor runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× 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: WebGLTextureUtils.copyTextureToTexture src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:857 — MethodTooLong — copyTextureToTexture runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× 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: WebGPUBackend.beginRender src/renderers/webgpu/WebGPUBackend.js:882 — MethodTooLong — beginRender runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× 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: Renderer.compileAsync src/renderers/common/Renderer.js:984 — MethodTooLong — compileAsync runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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: XR.constructor editor/js/Viewport.XR.js:10 — MethodTooLong — constructor runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× 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: TextureParametersDialog.constructor editor/js/TextureParametersDialog.js:8 — MethodTooLong — constructor 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: WebGLBackend.draw src/renderers/webgl-fallback/WebGLBackend.js:1129 — MethodTooLong — draw 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.
  • + 8 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×28
  • Swallowed exception (empty catch) devtools/content-script.js:22 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) devtools/background.js:20 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) devtools/background.js:21 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) devtools/background.js:22 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) devtools/background.js:28 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) devtools/background.js:42 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) devtools/background.js:54 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) devtools/background.js:72 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) editor/js/Sidebar.Material.MapProperty.js:130 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/Script.js:217 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/Loader.js:52 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/Loader.js:397 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/Loader.js:447 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/Loader.js:1078 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/Loader.js:1120 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/libs/ui.js:507 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/libs/codemirror/codemirror.js:144 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/libs/codemirror/codemirror.js:689 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/libs/codemirror/codemirror.js:6601 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/libs/codemirror/codemirror.js:8952 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/libs/codemirror/codemirror.js:9506 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) editor/js/libs/codemirror/codemirror.js:9732 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) manual/resources/tools/geo-picking/shapefile.js:441 — `.catch(function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) src/renderers/webgl/WebGLTextures.js:34 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/renderers/webgpu/utils/WebGPUTextureUtils.js:1032 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 3 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×24
  • TooManyMethods: NodeBuilder src/nodes/core/NodeBuilder.js:175 — TooManyMethods — 146 methods. The bar is 30 methods; this is 116 over it, 4.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: Renderer src/renderers/common/Renderer.js:134 — TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.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: WGSLNodeBuilder src/renderers/webgpu/nodes/WGSLNodeBuilder.js:297 — TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.63× 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: Vector3 src/math/Vector3.js:29 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Backend src/renderers/common/Backend.js:20 — TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.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.
  • TooManyMethods: WebGLBackend src/renderers/webgl-fallback/WebGLBackend.js:28 — 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: WebGPUBackend src/renderers/webgpu/WebGPUBackend.js:55 — 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: GLSLNodeBuilder src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:174 — 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: Vector2 src/math/Vector2.js:28 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: Vector4 src/math/Vector4.js:27 — 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: Node src/nodes/core/Node.js:22 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: Object3D src/core/Object3D.js:64 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Matrix4 src/math/Matrix4.js:42 — 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: Color src/math/Color.js:88 — 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: BatchedMesh src/objects/BatchedMesh.js:187 — 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: NodeManager src/renderers/common/nodes/NodeManager.js:28 — 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: WebGLState src/renderers/webgl-fallback/utils/WebGLState.js:27 — 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: TextureNode src/nodes/accessors/TextureNode.js:25 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Box3 src/math/Box3.js:6 — 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: Quaternion src/math/Quaternion.js:19 — 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: BufferAttribute src/core/BufferAttribute.js:21 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BufferGeometry src/core/BufferGeometry.js:48 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: XRManager src/renderers/common/XRManager.js:30 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnimationAction src/animation/AnimationAction.js:7 — 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.
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
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×21
  • Untrusted text written into markup unescaped devtools/panel/panel.js:578 — `title` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped editor/js/Sidebar.Scene.js:102 — `getObjectType(object)` is text this program did not author, and it is written into a quoted attribute value through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped editor/js/Sidebar.Settings.History.js:97 — `'&nbsp;'+object.name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped editor/js/Sidebar.Settings.History.js:113 — `'&nbsp;'+object.name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped editor/js/libs/codemirror/addon/dialog.js:24 — `template` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped editor/js/libs/ui.js:412 — `options[key]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped manual/resources/lesson.js:30 — `text` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:1475 — `sourceCodeHtml` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped manual/resources/threejs-primitives.js:893 — `text` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:368 — `num` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:2226 — `node.searchSnippet` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:2320 — `node.searchSnippet` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:2436 — `iconName` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:2448 — `iconName` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:2459 — `iconName` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped tsl/js/managers/ProjectsManager.js:655 — `t.name` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped tsl/js/managers/ProjectsManager.js:747 — `t.name` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped tsl/js/managers/ProjectsManager.js:752 — `project.name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped tsl/js/managers/ProjectsManager.js:759 — `dateStr` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped tsl/js/utils/MarkdownUtils.js:1259 — `safeUrl` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped utils/server.js:90 — `safeHref` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
D3 · God Classes · ClassTooLong · ×19
  • ClassTooLong: WebGLRenderer src/renderers/WebGLRenderer.js:64 — ClassTooLong — 1394 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 994 over it, 3.49× 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: WebGPUBackend src/renderers/webgpu/WebGPUBackend.js:55 — ClassTooLong — 1251 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 851 over it, 3.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.
  • ClassTooLong: Renderer src/renderers/common/Renderer.js:134 — ClassTooLong — 1246 significant lines (blank, comment-only and punctuation-only lines excluded), 97 methods. The bar is 400 significant lines; this is 846 over it, 3.12× 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: WebGLTextures src/renderers/webgl/WebGLTextures.js:1 — ClassTooLong — 1068 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 668 over it, 2.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.
  • ClassTooLong: WebGLBackend src/renderers/webgl-fallback/WebGLBackend.js:28 — ClassTooLong — 968 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 568 over it, 2.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WGSLNodeBuilder src/renderers/webgpu/nodes/WGSLNodeBuilder.js:297 — ClassTooLong — 767 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods. The bar is 400 significant lines; this is 367 over it, 1.92× 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: PlaygroundManager tsl/js/managers/PlaygroundManager.js:6 — ClassTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 265 over it, 1.66× 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: WebGLState src/renderers/webgl/WebGLState.js:1 — ClassTooLong — 652 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 252 over it, 1.63× 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: WebGLState src/renderers/webgl-fallback/utils/WebGLState.js:27 — ClassTooLong — 600 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 200 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GLSLNodeBuilder src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:174 — ClassTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 157 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: ObjectLoader src/loaders/ObjectLoader.js:85 — ClassTooLong — 532 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 132 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: Matrix4 src/math/Matrix4.js:42 — ClassTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 128 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: Loader editor/js/Loader.js:1 — ClassTooLong — 506 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 106 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WebGLPrograms src/renderers/webgl/WebGLPrograms.js:1 — ClassTooLong — 468 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 68 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BufferGeometry src/core/BufferGeometry.js:48 — ClassTooLong — 458 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 58 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.
  • ClassTooLong: Material src/materials/Material.js:19 — ClassTooLong — 450 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 50 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.
  • ClassTooLong: Object3D src/core/Object3D.js:64 — ClassTooLong — 448 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 48 over it, 1.12× 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: WebGPUPipelineUtils src/renderers/webgpu/utils/WebGPUPipelineUtils.js:34 — ClassTooLong — 447 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 47 over it, 1.12× 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: Viewport editor/js/Viewport.js:1 — ClassTooLong — 417 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 17 over it, 1.04× 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×18
  • Low cohesion: NodeBuilder (LCOM4 9) src/nodes/core/NodeBuilder.js:175 — NodeBuilder's methods fall into 9 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 9 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: Loader (LCOM4 8) src/loaders/Loader.js:8 — Loader's methods fall into 8 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 8 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: ColladaComposer (LCOM4 7) examples/jsm/loaders/collada/ColladaComposer.js:48 — ColladaComposer'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: WebGPUBackend (LCOM4 7) src/renderers/webgpu/WebGPUBackend.js:55 — WebGPUBackend'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: OctreeCell (LCOM4 5) examples/jsm/misc/SculptorMesh.js:319 — OctreeCell'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: Value (LCOM4 5) examples/jsm/inspector/ui/Values.js:3 — Value'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: WebGLNodesHandler (LCOM4 5) examples/jsm/tsl/WebGLNodesHandler.js:270 — WebGLNodesHandler'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: PropertyMixer (LCOM4 5) src/animation/PropertyMixer.js:6 — PropertyMixer'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: StorageBufferNode (LCOM4 5) src/nodes/accessors/StorageBufferNode.js:39 — StorageBufferNode'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: LightsNode (LCOM4 5) src/nodes/lighting/LightsNode.js:87 — LightsNode'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: WebGLState (LCOM4 5) src/renderers/webgl-fallback/utils/WebGLState.js:27 — WebGLState'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: WebGLTextureUtils (LCOM4 5) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:13 — WebGLTextureUtils'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: UIInteger (LCOM4 4) editor/js/libs/ui.js:762 — UIInteger'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: BitonicSort (LCOM4 4) examples/jsm/gpgpu/BitonicSort.js:63 — BitonicSort'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: LOD (LCOM4 4) src/objects/LOD.js:33 — LOD'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: GLBufferAttribute (LCOM4 4) src/core/GLBufferAttribute.js:12 — GLBufferAttribute'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: Node (LCOM4 4) src/nodes/core/Node.js:22 — Node'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: WebGLBackend (LCOM4 4) src/renderers/webgl-fallback/WebGLBackend.js:28 — WebGLBackend'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.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×17
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:273 — `.page-transition` moves (`animation: fadeIn 0.3s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:547 — `.sidebar` moves (`transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:643 — `.toc-chevron` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:1822 — `#editor-console` moves (`transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:2019 — `.sidebar-search-icon` moves (`transition: color 0.15s ease, left 0.25s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:2367 — `.playground-custom-scrollbar` moves (`transition: height 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:2701 — `.tsl-embed-lock-circle` moves (`transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:3135 — `.guide-ai-chevron` moves (`transition: transform 0.25s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:3273 — `.tsl-api-class-chevron` moves (`transition: transform 0.25s ease, color 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:3549 — `.x-tweet-card` moves (`transition: border-color 0.25s, transform 0.25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:3659 — `.sidebar` moves (`transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:3696 — `.loading-screen::before` moves (`animation: forward-zoom 12s cubic-bezier(0.1, 0.7, 0.3, 1) infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:3718 — `.loading-spinner` moves (`animation: rotate 2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:4088 — `.tsl-modal-container` moves (`animation: tslModalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tsl/css/guide.css:4172 — `.tsl-btn` moves (`transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s, transform 0.1s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard files/main.css:499 — `#projects a img` moves (`transition: 0.15s transform`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard files/main.css:666 — `#contentWrapper` moves (`transition: .25s transform`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×15
  • Focus outline removed in CSS without a :focus replacement tsl/css/guide.css:1998 — `.sidebar-search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tsl/css/guide.css:2514 — `.playground-tab-rename-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tsl/css/guide.css:2531 — `.playground-tab-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tsl/css/guide.css:2538 — `.playground-tab-btn:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tsl/css/guide.css:4416 — `.tsl-project-rename-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement files/main.css:256 — `#panel #filterInput` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement files/main.css:289 — `#panel #language:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement editor/js/libs/codemirror/codemirror.css:165 — `.CodeMirror-scroll` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement editor/js/libs/codemirror/codemirror.css:181 — `.CodeMirror-vscrollbar` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement editor/js/libs/codemirror/codemirror.css:279 — `.CodeMirror-code` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement editor/js/libs/codemirror/addon/dialog.css:23 — `.CodeMirror-dialog input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement editor/css/main.css:51 — `.TextArea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement editor/css/main.css:280 — `.Button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement editor/css/main.css:310 — `.Select` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement editor/css/main.css:616 — `.Outliner` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D2 · Cognitive Complexity · constructor · ×10
  • constructor::setProgram (cognitive 142) src/renderers/WebGLRenderer.js:2411 — constructor::setProgram has cognitive complexity 142 (threshold 15). Drivers by points: if/else 64 (85 pts), boolean chains 49, ternaries 5 (6 pts), loops 1 (2 pts) (nesting depth added 23). 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.
  • constructor::render (cognitive 67) src/renderers/WebGLRenderer.js:1641 — constructor::render has cognitive complexity 67 (threshold 15). Drivers by points: if/else 34 (46 pts), boolean chains 14, loops 2 (7 pts) (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.
  • constructor::copyTextureToTexture (cognitive 60) src/renderers/WebGLRenderer.js:3380 — constructor::copyTextureToTexture has cognitive complexity 60 (threshold 15). Drivers by points: if/else 30 (44 pts), boolean chains 7, ternaries 3 (5 pts), loops 2 (4 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.
  • constructor::renderBufferDirect (cognitive 40) src/renderers/WebGLRenderer.js:1200 — constructor::renderBufferDirect has cognitive complexity 40 (threshold 15). Drivers by points: if/else 24 (29 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 10). 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.
  • constructor::setRenderTarget (cognitive 40) src/renderers/WebGLRenderer.js:2972 — constructor::setRenderTarget has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 5, 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.
  • constructor::setSession (cognitive 25) src/renderers/webxr/WebXRManager.js:409 — constructor::setSession has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (15 pts), if/else 5 (9 pts), boolean chains 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.
  • constructor::getProgram (cognitive 23) src/renderers/WebGLRenderer.js:2200 — constructor::getProgram has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (10 pts), ternaries 2 (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.
  • constructor::readRenderTargetPixelsAsync (cognitive 23) src/renderers/WebGLRenderer.js:3257 — constructor::readRenderTargetPixelsAsync has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, ternaries 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.
  • constructor::renderTransmissionPass (cognitive 21) src/renderers/WebGLRenderer.js:2015 — constructor::renderTransmissionPass has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, ternaries 2 (3 pts), loops 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.
  • constructor::readRenderTargetPixels (cognitive 18) src/renderers/WebGLRenderer.js:3170 — constructor::readRenderTargetPixels has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 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.
X1 · Async correctness · `async` Promise executor · ×10
  • `async` Promise executor build/three.webgpu.nodes.js:63853 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor build/three.webgpu.nodes.js:88129 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor build/three.webgpu.nodes.js:88290 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor build/three.webgpu.js:22724 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor build/three.webgpu.js:47000 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor build/three.webgpu.js:47161 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor src/renderers/common/Renderer.js:880 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor src/renderers/webgpu/utils/WebGPUPipelineUtils.js:282 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor src/renderers/webgpu/utils/WebGPUPipelineUtils.js:443 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor REDACTED:2641 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
AC3 · Page structure · Page without a main landmark · ×9
  • Page without a main landmark devtools/panel/panel.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark editor/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark manual/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark manual/pages/animation-system.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark manual/pages/backgrounds.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark manual/pages/billboards.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark manual/pages/cameras.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark manual/pages/canvas-textures.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · WebGLTextures.WebGLTextures · ×8
  • WebGLTextures.WebGLTextures::uploadTexture (cyclomatic 79) src/renderers/webgl/WebGLTextures.js:962 — WebGLTextures.WebGLTextures::uploadTexture has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 7 other methods here (WebGLTextures.WebGLTextures::getInternalFormat, WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::setTextureParameters, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • WebGLTextures.WebGLTextures::getInternalFormat (cyclomatic 74) src/renderers/webgl/WebGLTextures.js:132 — WebGLTextures.WebGLTextures::getInternalFormat 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 shape REPEATS in the file: 7 other methods here (WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::setTextureParameters, WebGLTextures.WebGLTextures::uploadTexture, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • WebGLTextures.WebGLTextures::uploadCubeTexture (cyclomatic 47) src/renderers/webgl/WebGLTextures.js:1469 — WebGLTextures.WebGLTextures::uploadCubeTexture has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 7 other methods here (WebGLTextures.WebGLTextures::getInternalFormat, WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::setTextureParameters, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • WebGLTextures.WebGLTextures::setupRenderTarget (cyclomatic 36) src/renderers/webgl/WebGLTextures.js:2066 — WebGLTextures.WebGLTextures::setupRenderTarget 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. This shape REPEATS in the file: 7 other methods here (WebGLTextures.WebGLTextures::getInternalFormat, WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::setTextureParameters, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • WebGLTextures.WebGLTextures::setTextureParameters (cyclomatic 22) src/renderers/webgl/WebGLTextures.js:725 — WebGLTextures.WebGLTextures::setTextureParameters has cyclomatic complexity 22 (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. This shape REPEATS in the file: 7 other methods here (WebGLTextures.WebGLTextures::getInternalFormat, WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::uploadTexture, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • WebGLTextures.WebGLTextures::updateMultisampleRenderTarget (cyclomatic 22) src/renderers/webgl/WebGLTextures.js:2339 — WebGLTextures.WebGLTextures::updateMultisampleRenderTarget 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. This shape REPEATS in the file: 7 other methods here (WebGLTextures.WebGLTextures::getInternalFormat, WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::setTextureParameters, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • WebGLTextures.WebGLTextures::deallocateRenderTarget (cyclomatic 19) src/renderers/webgl/WebGLTextures.js:469 — WebGLTextures.WebGLTextures::deallocateRenderTarget 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. This shape REPEATS in the file: 7 other methods here (WebGLTextures.WebGLTextures::getInternalFormat, WebGLTextures.WebGLTextures::setTextureParameters, WebGLTextures.WebGLTextures::uploadTexture, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • WebGLTextures.WebGLTextures::setupDepthRenderbuffer (cyclomatic 16) src/renderers/webgl/WebGLTextures.js:1919 — WebGLTextures.WebGLTextures::setupDepthRenderbuffer 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. This shape REPEATS in the file: 7 other methods here (WebGLTextures.WebGLTextures::getInternalFormat, WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::setTextureParameters, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
D35 · Change Coupling · Change coupling · ×8
  • Change coupling: constants.js ↔ colorspace_pars_fragment.glsl.js src/constants.js:1 — `src/constants.js` and `src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.js` change together 80% of the time (8 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 8 shared commits counted here, the most recent 3 are `076ff076` ColorManagement: Add ColorManagement.define( { ... } ) (#29450); `24ccd56f` WebGLRenderer: Support "Linear Display P3" working color space and "D…; `05fc79cd` WebGLRenderer: Remove inline sRGB decode. (#23129) (at that commit the file was still `src/renderers/shaders/ShaderChunk/encodings_pars_fragment.glsl.js`) — run `git show` on any of them.
  • Change coupling: lights_physical_pars_fragment.glsl.js ↔ meshphysical.glsl.js src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js:1 — `src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js` and `src/renderers/shaders/ShaderLib/meshphysical.glsl.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 — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `18e109a6` MeshPhysicalMaterial: Add EON rough diffuse BRDF (#34379); `3fce9681` Src: Improve retroreflection nomenclature (#34079); `ef1dc35f` MeshPhysicalMaterial: Add support for retroreflectivity. (#33949) — run `git show` on any of them.
  • Change coupling: Bindings.js ↔ SampledTexture.js src/renderers/common/Bindings.js:1 — `src/renderers/common/Bindings.js` and `src/renderers/common/SampledTexture.js` change together 64% of the time (9 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 9 shared commits counted here, the most recent 3 are `e1809743` WebGPURenderer: Allow manual mipmap creation with StorageTexture (#31…; `3752bd27` WebGPURenderer: Improve and fix texture bindings manager (#31497); `84a951eb` WebGPURenderer: `SampledTexture` extends of `Sampler` for bindings (#… — run `git show` on any of them.
  • Change coupling: PostProcessing.js ↔ QuadMesh.js src/renderers/common/PostProcessing.js:1 — `src/renderers/common/PostProcessing.js` and `src/renderers/common/QuadMesh.js` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency 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 `9aad521b` Renderer: Fix breakage in deprecated methods. (#32029); `69317a85` Renderer: Deprecate `renderAsync()`. (#32022); `5f265a25` Docs: More JSDoc. (#30636) — run `git show` on any of them.
  • Change coupling: IsolateNode.js ↔ NodeBuilder.js src/nodes/core/IsolateNode.js:1 — `src/nodes/core/IsolateNode.js` and `src/nodes/core/NodeBuilder.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 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 6 shared commits counted here, the most recent 3 are `4437d863` TSL: Introduce `subBuild()` (#31260) (at that commit the file was still `src/nodes/core/CacheNode.js`); `ba6091f4` TSL: Introduce `namespace` (#31168) (at that commit the file was still `src/nodes/core/CacheNode.js`); `ddfa74b9` Docs: fix types (#30677) (at that commit the file was still `src/nodes/core/CacheNode.js`) — run `git show` on any of them.
  • Change coupling: lights_physical_fragment.glsl.js ↔ meshphysical.glsl.js src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js:1 — `src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js` and `src/renderers/shaders/ShaderLib/meshphysical.glsl.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 — 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 `18e109a6` MeshPhysicalMaterial: Add EON rough diffuse BRDF (#34379); `3fce9681` Src: Improve retroreflection nomenclature (#34079); `ef1dc35f` MeshPhysicalMaterial: Add support for retroreflectivity. (#33949) — run `git show` on any of them.
  • Change coupling: WebGLRenderer.js ↔ UniformsLib.js src/renderers/WebGLRenderer.js:1 — `src/renderers/WebGLRenderer.js` and `src/renderers/shaders/UniformsLib.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 — 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 `c6a56a8e` WebGLRenderer: Add SunLight with cascaded shadow maps. (#34221); `1da9cef7` LightProbeGrid: Add position-dependent diffuse Global Illumination (#…; `48c607f8` WebGLRenderer: Fix shadow map uniform management. (#32590) — run `git show` on any of them.
  • Change coupling: Editor.js ↔ Sidebar.Project.Renderer.js editor/js/Editor.js:1 — `editor/js/Editor.js` and `editor/js/Sidebar.Project.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 `0d711cd7` Editor: Add support for orthographic cameras. (#33701); `582ff97d` Editor: Added WebGPURenderer support. (#32842); `81563d44` Editor: Enable logarithmic depth buffer. (#32732) — run `git show` on any of them.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D2 · Cognitive Complexity · WebGLTextures · ×6
  • WebGLTextures::uploadCubeTexture (cognitive 176) src/renderers/webgl/WebGLTextures.js:1469 — WebGLTextures::uploadCubeTexture has cognitive complexity 176 (threshold 15). Drivers by points: if/else 39 (132 pts), loops 7 (27 pts), boolean chains 9, ternaries 3 (8 pts) (nesting depth added 118). 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.
  • WebGLTextures::getInternalFormat (cognitive 119) src/renderers/webgl/WebGLTextures.js:132 — WebGLTextures::getInternalFormat has cognitive complexity 119 (threshold 15). Drivers by points: if/else 58 (105 pts), boolean chains 9, ternaries 2 (5 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WebGLTextures::setupRenderTarget (cognitive 84) src/renderers/webgl/WebGLTextures.js:2066 — WebGLTextures::setupRenderTarget has cognitive complexity 84 (threshold 15). Drivers by points: if/else 27 (48 pts), loops 9 (26 pts), ternaries 2 (7 pts), boolean chains 3 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WebGLTextures::updateMultisampleRenderTarget (cognitive 66) src/renderers/webgl/WebGLTextures.js:2339 — WebGLTextures::updateMultisampleRenderTarget has cognitive complexity 66 (threshold 15). Drivers by points: if/else 14 (44 pts), loops 3 (11 pts), ternaries 2 (7 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.
  • WebGLTextures::resizeImage (cognitive 22) src/renderers/webgl/WebGLTextures.js:49 — WebGLTextures::resizeImage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, ternaries 1 (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.
  • WebGLTextures::setTextureParameters (cognitive 19) src/renderers/webgl/WebGLTextures.js:725 — WebGLTextures::setTextureParameters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7 (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 · WebGLTextures.WebGLTextures · ×5
  • WebGLTextures.WebGLTextures::uploadTexture (cognitive 315) src/renderers/webgl/WebGLTextures.js:962 — WebGLTextures.WebGLTextures::uploadTexture has cognitive complexity 315 (threshold 15). Drivers by points: if/else 82 (262 pts), loops 7 (37 pts), boolean chains 10, ternaries 2 (6 pts) (nesting depth added 214). 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. This shape REPEATS in the file: 4 other methods here (WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::setupRenderBufferStorage, WebGLTextures.WebGLTextures::setupDepthTexture, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • WebGLTextures.WebGLTextures::setupDepthRenderbuffer (cognitive 46) src/renderers/webgl/WebGLTextures.js:1919 — WebGLTextures.WebGLTextures::setupDepthRenderbuffer has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (30 pts), ternaries 2 (9 pts), loops 2 (6 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. This shape REPEATS in the file: 4 other methods here (WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::uploadTexture, WebGLTextures.WebGLTextures::setupRenderBufferStorage, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • WebGLTextures.WebGLTextures::deallocateRenderTarget (cognitive 42) src/renderers/webgl/WebGLTextures.js:469 — WebGLTextures.WebGLTextures::deallocateRenderTarget has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 5 (13 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. This shape REPEATS in the file: 4 other methods here (WebGLTextures.WebGLTextures::uploadTexture, WebGLTextures.WebGLTextures::setupRenderBufferStorage, WebGLTextures.WebGLTextures::setupDepthTexture, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • WebGLTextures.WebGLTextures::setupRenderBufferStorage (cognitive 18) src/renderers/webgl/WebGLTextures.js:1778 — WebGLTextures.WebGLTextures::setupRenderBufferStorage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 pts), loops 1 (2 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. This shape REPEATS in the file: 4 other methods here (WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::uploadTexture, WebGLTextures.WebGLTextures::setupDepthTexture, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • WebGLTextures.WebGLTextures::setupDepthTexture (cognitive 18) src/renderers/webgl/WebGLTextures.js:1842 — WebGLTextures.WebGLTextures::setupDepthTexture has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 3, boolean chains 2 (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. This shape REPEATS in the file: 4 other methods here (WebGLTextures.WebGLTextures::deallocateRenderTarget, WebGLTextures.WebGLTextures::uploadTexture, WebGLTextures.WebGLTextures::setupRenderBufferStorage, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
D1 · Cyclomatic Complexity · WebGLRenderer.constructor · ×4
  • WebGLRenderer.constructor::setProgram (cyclomatic 128) src/renderers/WebGLRenderer.js:2411 — WebGLRenderer.constructor::setProgram has cyclomatic complexity 128 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (WebGLRenderer.constructor, WebGLRenderer.constructor::projectObject, WebGLRenderer.constructor::renderTransmissionPass, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • WebGLRenderer.constructor::projectObject (cyclomatic 30) src/renderers/WebGLRenderer.js:1873 — WebGLRenderer.constructor::projectObject 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. This shape REPEATS in the file: 4 other methods here (WebGLRenderer.constructor, WebGLRenderer.constructor::renderTransmissionPass, WebGLRenderer.constructor::getProgram, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • WebGLRenderer.constructor::getProgram (cyclomatic 22) src/renderers/WebGLRenderer.js:2200 — WebGLRenderer.constructor::getProgram has cyclomatic complexity 22 (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. This shape REPEATS in the file: 4 other methods here (WebGLRenderer.constructor, WebGLRenderer.constructor::projectObject, WebGLRenderer.constructor::renderTransmissionPass, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • WebGLRenderer.constructor::renderTransmissionPass (cyclomatic 17) src/renderers/WebGLRenderer.js:2015 — WebGLRenderer.constructor::renderTransmissionPass has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (WebGLRenderer.constructor, WebGLRenderer.constructor::projectObject, WebGLRenderer.constructor::getProgram, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
D1 · Cyclomatic Complexity · constructor · ×4
  • constructor::render (cyclomatic 47) src/renderers/WebGLRenderer.js:1641 — constructor::render has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • constructor::copyTextureToTexture (cyclomatic 33) src/renderers/WebGLRenderer.js:3380 — constructor::copyTextureToTexture 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.
  • constructor::renderBufferDirect (cyclomatic 27) src/renderers/WebGLRenderer.js:1200 — constructor::renderBufferDirect has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • constructor::setRenderTarget (cyclomatic 26) src/renderers/WebGLRenderer.js:2972 — constructor::setRenderTarget 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.
D2 · Cognitive Complexity · addEditorMethods · ×4
  • addEditorMethods::getHelpers (cognitive 17) editor/js/libs/codemirror/codemirror.js:8390 — addEditorMethods::getHelpers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (3 pts), boolean chains 2 (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.
  • addEditorMethods::getTokenTypeAt (cognitive 16) editor/js/libs/codemirror/codemirror.js:8364 — addEditorMethods::getTokenTypeAt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 4 (7 pts), 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.
  • addEditorMethods::addWidget (cognitive 16) editor/js/libs/codemirror/codemirror.js:8460 — addEditorMethods::addWidget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • addEditorMethods::findWordAt (cognitive 16) editor/js/libs/codemirror/codemirror.js:8575 — addEditorMethods::findWordAt has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 4, if/else 3 (4 pts), loops 2 (4 pts), ternaries 2 (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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×4
  • Outbound HTTP without resilience editor/js/Script.js:312 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:229 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:648 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience tsl/js/managers/PlaygroundManager.js:1204 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
X2 · Cancellation propagation · Async function without AbortSignal · ×4
  • Async function without AbortSignal: loadThreeDefs editor/js/Script.js:304 — `loadThreeDefs` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: load REDACTED:225 — `load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: load REDACTED:584 — `load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: showImportedFiles tsl/js/managers/PlaygroundManager.js:1182 — `showImportedFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
AC1 · Text alternatives · <canvas> without a text alternative · ×3
  • <canvas> without a text alternative manual/pages/cameras.html:550 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative manual/pages/custom-buffergeometry.html:436 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative manual/pages/fog.html:268 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
D2 · Cognitive Complexity · Sidebar.Object.SidebarObject · ×3
  • Sidebar.Object.SidebarObject::update (cognitive 87) editor/js/Sidebar.Object.js:430 — Sidebar.Object.SidebarObject::update has cognitive complexity 87 (threshold 15). Drivers by points: if/else 32 (70 pts), boolean chains 15, error handling 1 (2 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (Sidebar.Object.SidebarObject::updateRows, Sidebar.Object.SidebarObject::updateUI) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • Sidebar.Object.SidebarObject::updateUI (cognitive 18) editor/js/Sidebar.Object.js:743 — Sidebar.Object.SidebarObject::updateUI has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, error handling 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. This shape REPEATS in the file: 2 other methods here (Sidebar.Object.SidebarObject::update, Sidebar.Object.SidebarObject::updateRows) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • Sidebar.Object.SidebarObject::updateRows (cognitive 17) editor/js/Sidebar.Object.js:634 — Sidebar.Object.SidebarObject::updateRows has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (7 pts), if/else 4 (5 pts), loops 2 (4 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. This shape REPEATS in the file: 2 other methods here (Sidebar.Object.SidebarObject::update, Sidebar.Object.SidebarObject::updateUI) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
R10 · Code Duplication · Duplicated block with local edits (55 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (55 matched lines × 2 locations) src/nodes/accessors/Morph.js:109 — src/nodes/accessors/Morph.js:109 · src/renderers/webgl/WebGLMorphtargets.js:28 — the two spans are one implementation copied and then locally edited — 470 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (55 matched lines × 2 locations) src/objects/Line.js:170 — src/objects/Line.js:170 · src/objects/Points.js:108 — the two spans are one implementation copied and then locally edited — 460 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (55 matched lines × 2 locations) src/renderers/common/XRManager.js:1239 — src/renderers/common/XRManager.js:1239 · src/renderers/webxr/WebXRManager.js:477 — the two spans are one implementation copied and then locally edited — 403 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 (40 lines × 2 locations) · ×3
  • Duplicated block (40 lines × 2 locations) src/extras/curves/CubicBezierCurve.js:27 — src/extras/curves/CubicBezierCurve.js:27 · src/extras/curves/CubicBezierCurve3.js:10 — 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 (40 lines × 2 locations) src/extras/curves/QuadraticBezierCurve.js:26 — src/extras/curves/QuadraticBezierCurve.js:26 · src/extras/curves/QuadraticBezierCurve3.js:10 — 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.
  • Duplicated block (40 lines × 2 locations) src/nodes/core/NodeFrame.js:212 — src/nodes/core/NodeFrame.js:212 · src/nodes/core/NodeFrame.js:261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · Sidebar.Object.SidebarObject · ×2
  • Sidebar.Object.SidebarObject::update (cyclomatic 49) editor/js/Sidebar.Object.js:430 — Sidebar.Object.SidebarObject::update has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Sidebar.Object.SidebarObject::updateUI) 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.
  • Sidebar.Object.SidebarObject::updateUI (cyclomatic 19) editor/js/Sidebar.Object.js:743 — Sidebar.Object.SidebarObject::updateUI 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. This shape REPEATS in the file: one other method here (Sidebar.Object.SidebarObject::update) 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.
D1 · Cyclomatic Complexity · index.html.updateFilter (cyclomatic 40) · ×2
  • index.html.updateFilter (cyclomatic 40) docs/index.html:2273 — index.html.updateFilter has cyclomatic complexity 40 (threshold 15). Of this number, 21 points are the body's own statements and 19 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.
  • index.html.updateFilter (cyclomatic 40) utils/docs/template/static/index.html:300 — index.html.updateFilter has cyclomatic complexity 40 (threshold 15). Of this number, 21 points are the body's own statements and 19 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 · (anonymous) · ×2
  • (anonymous)::parse (cyclomatic 37) editor/js/libs/jsonlint.js:81 — (anonymous)::parse has cyclomatic complexity 37 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
  • (anonymous)::(anonymous)::next (cyclomatic 16) editor/js/libs/jsonlint.js:321 — (anonymous)::(anonymous)::next has cyclomatic complexity 16 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · WebGLState.setBlending (cyclomatic 29) · ×2
  • WebGLState.setBlending (cyclomatic 29) src/renderers/webgl-fallback/utils/WebGLState.js:468 — WebGLState.setBlending 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.
  • WebGLState.setBlending (cyclomatic 29) src/renderers/webgl/WebGLState.js:609 — WebGLState.setBlending 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 · prettify.combinePrefixPatterns · ×2
  • prettify.combinePrefixPatterns::allowAnywhereFoldCaseAndRenumberGroups (cyclomatic 23) REDACTED:375 — prettify.combinePrefixPatterns::allowAnywhereFoldCaseAndRenumberGroups has cyclomatic complexity 23 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (prettify.combinePrefixPatterns::caseFoldCharset) 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.
  • prettify.combinePrefixPatterns::caseFoldCharset (cyclomatic 18) REDACTED:303 — prettify.combinePrefixPatterns::caseFoldCharset has cyclomatic complexity 18 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (prettify.combinePrefixPatterns::allowAnywhereFoldCaseAndRenumberGroups) 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.
D1 · Cyclomatic Complexity · WebGLShadowMap.WebGLShadowMap · ×2
  • WebGLShadowMap.WebGLShadowMap::getDepthMaterial (cyclomatic 23) src/renderers/webgl/WebGLShadowMap.js:431 — WebGLShadowMap.WebGLShadowMap::getDepthMaterial 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. This shape REPEATS in the file: one other method here (WebGLShadowMap.WebGLShadowMap::renderObject) 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.
  • WebGLShadowMap.WebGLShadowMap::renderObject (cyclomatic 17) src/renderers/webgl/WebGLShadowMap.js:520 — WebGLShadowMap.WebGLShadowMap::renderObject has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (WebGLShadowMap.WebGLShadowMap::getDepthMaterial) 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 · index.html.updateFilter (cognitive 117) · ×2
  • index.html.updateFilter (cognitive 117) docs/index.html:2273 — index.html.updateFilter has cognitive complexity 117 (threshold 15). Drivers by points: if/else 22 (64 pts), ternaries 7 (30 pts), loops 5 (15 pts), boolean chains 8 (nesting depth added 75). Of this number, 68 points are the body's own statements and 49 belong to 3 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.
  • index.html.updateFilter (cognitive 117) utils/docs/template/static/index.html:300 — index.html.updateFilter has cognitive complexity 117 (threshold 15). Drivers by points: if/else 22 (64 pts), ternaries 7 (30 pts), loops 5 (15 pts), boolean chains 8 (nesting depth added 75). Of this number, 68 points are the body's own statements and 49 belong to 3 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 · ExtrudeGeometry.constructor · ×2
  • ExtrudeGeometry.constructor::addShape (cognitive 90) src/geometries/ExtrudeGeometry.js:81 — ExtrudeGeometry.constructor::addShape has cognitive complexity 90 (threshold 15). Drivers by points: if/else 19 (43 pts), loops 16 (31 pts), ternaries 12 (16 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent 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 (ExtrudeGeometry.constructor::addShape::getBevelVec) 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.
  • ExtrudeGeometry.constructor::addShape::getBevelVec (cognitive 26) src/geometries/ExtrudeGeometry.js:236 — ExtrudeGeometry.constructor::addShape::getBevelVec has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (26 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. This shape REPEATS in the file: one other method here (ExtrudeGeometry.constructor::addShape) 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 · WebGLShadowMap · ×2
  • WebGLShadowMap::render (cognitive 87) src/renderers/webgl/WebGLShadowMap.js:92 — WebGLShadowMap::render has cognitive complexity 87 (threshold 15). Drivers by points: if/else 30 (67 pts), ternaries 3 (9 pts), boolean chains 8, 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.
  • WebGLShadowMap::getDepthMaterial (cognitive 31) src/renderers/webgl/WebGLShadowMap.js:431 — WebGLShadowMap::getDepthMaterial has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 10, ternaries 5 (8 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 · (anonymous) · ×2
  • (anonymous)::parse (cognitive 80) editor/js/libs/jsonlint.js:81 — (anonymous)::parse has cognitive complexity 80 (threshold 15). Drivers by points: if/else 20 (54 pts), boolean chains 11, loops 3 (8 pts), ternaries 1 (5 pts), match/switch 1 (2 pts) (nesting depth added 44). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
  • (anonymous)::(anonymous)::next (cognitive 24) editor/js/libs/jsonlint.js:321 — (anonymous)::(anonymous)::next has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 7). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · WebXRManager.constructor · ×2
  • WebXRManager.constructor::onAnimationFrame (cognitive 56) src/renderers/webxr/WebXRManager.js:854 — WebXRManager.constructor::onAnimationFrame has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (42 pts), boolean chains 8, loops 3 (6 pts) (nesting depth added 28). 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. This shape REPEATS in the file: one other method here (WebXRManager.constructor::onInputSourcesChange) 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.
  • WebXRManager.constructor::onInputSourcesChange (cognitive 19) src/renderers/webxr/WebXRManager.js:566 — WebXRManager.constructor::onInputSourcesChange has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 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. This shape REPEATS in the file: one other method here (WebXRManager.constructor::onAnimationFrame) 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 · prettify.combinePrefixPatterns · ×2
  • prettify.combinePrefixPatterns::allowAnywhereFoldCaseAndRenumberGroups (cognitive 39) REDACTED:375 — prettify.combinePrefixPatterns::allowAnywhereFoldCaseAndRenumberGroups has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 16). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (prettify.combinePrefixPatterns::caseFoldCharset) 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.
  • prettify.combinePrefixPatterns::caseFoldCharset (cognitive 36) REDACTED:303 — prettify.combinePrefixPatterns::caseFoldCharset has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 4, loops 3, ternaries 1 (2 pts) (nesting depth added 16). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (prettify.combinePrefixPatterns::allowAnywhereFoldCaseAndRenumberGroups) 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 · prettify.numberLines · ×2
  • prettify.numberLines::walk (cognitive 22) REDACTED:1015 — prettify.numberLines::walk has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 10). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (prettify.numberLines::findTextWithPrefix) 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.
  • prettify.numberLines::findTextWithPrefix (cognitive 19) REDACTED:1130 — prettify.numberLines::findTextWithPrefix has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 9). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (prettify.numberLines::walk) 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 · index.html.createNewIframe (cognitive 20) · ×2
  • index.html.createNewIframe (cognitive 20) docs/index.html:2546 — index.html.createNewIframe has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 1 (3 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.
  • index.html.createNewIframe (cognitive 20) utils/docs/template/static/index.html:573 — index.html.createNewIframe has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 1 (3 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 · init · ×2
  • init::onWindowResize (cognitive 20) REDACTED:480 — init::onWindowResize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 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.
  • init::onkeydown (cognitive 19) REDACTED:628 — init::onkeydown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (19 pts) (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.
R10 · Code Duplication · Duplicated block with local edits (45 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (45 matched lines × 2 locations) editor/js/Sidebar.Scene.js:175 — editor/js/Sidebar.Scene.js:175 · editor/js/Sidebar.Scene.js:278 — the two spans are one implementation copied and then locally edited — 372 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 (45 matched lines × 2 locations) src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js:91 — src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js:91 · src/renderers/webgl/WebGLAttributes.js:16 — the two spans are one implementation copied and then locally edited — 302 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) · ×2
  • Duplicated block (42 lines × 2 locations) REDACTED:757 — REDACTED:757 · REDACTED:1068 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (42 lines × 2 locations) tsl/js/utils/MarkdownUtils.js:648 — tsl/js/utils/MarkdownUtils.js:648 · tsl/js/utils/MarkdownUtils.js:691 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (39 lines × 2 locations) · ×2
  • Duplicated block (39 lines × 2 locations) src/renderers/webgl-fallback/utils/WebGLState.js:501 — src/renderers/webgl-fallback/utils/WebGLState.js:501 · src/renderers/webgl/WebGLState.js:640 — 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 (39 lines × 2 locations) src/renderers/webgl-fallback/utils/WebGLState.js:1419 — src/renderers/webgl-fallback/utils/WebGLState.js:1419 · src/renderers/webgl/WebGLState.js:1217 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R2 · Cyclomatic Complexity · Complex function convert (cyclomatic 126, cognitive 256) · ×2
  • Complex function convert (cyclomatic 126, cognitive 256) src/renderers/webgl-fallback/utils/WebGLUtils.js:51 — convert has cyclomatic complexity 126 and cognitive complexity 256; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function convert (cyclomatic 126, cognitive 256) src/renderers/webgl/WebGLUtils.js:6 — convert has cyclomatic complexity 126 and cognitive complexity 256; 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.
AC4 · Keyboard semantics · Anchor without href · ×1
  • Anchor without href manual/pages/game.html:1920 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.0 · ×1
  • Low contrast colour pair in CSS (1.0:1) files/main.css:250 — `#panel #filterInput` sets color: #bbb on background-color: #bbb — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.1 · ×1
  • Low contrast colour pair in CSS (3.1:1) editor/css/main.css:572 — `#tabs span.selected` sets color: #888 on background-color: #eee — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 81 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · WebGLProgram.WebGLProgram (cyclomatic 191) · ×1
  • WebGLProgram.WebGLProgram (cyclomatic 191) src/renderers/webgl/WebGLProgram.js:371 — WebGLProgram.WebGLProgram has cyclomatic complexity 191 (threshold 15). Of this number, 178 points are the body's own statements and 13 belong to 4 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 · Material.fromJSON (cyclomatic 164) · ×1
  • Material.fromJSON (cyclomatic 164) src/materials/Material.js:920 — Material.fromJSON has cyclomatic complexity 164 (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 · codemirror.addEditorMethods (cyclomatic 139) · ×1
  • codemirror.addEditorMethods (cyclomatic 139) editor/js/libs/codemirror/codemirror.js:8270 — codemirror.addEditorMethods has cyclomatic complexity 139 (threshold 15). Of this number, 35 points are the body's own statements and 104 belong to 32 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 · WebGLUtils.convert (cyclomatic 126) · ×1
  • WebGLUtils.convert (cyclomatic 126) src/renderers/webgl-fallback/utils/WebGLUtils.js:51 — WebGLUtils.convert has cyclomatic complexity 126 (threshold 15). To reduce it, separate the cases: extract each independent 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 · WebGLUtils.WebGLUtils.convert (cyclomatic 126) · ×1
  • WebGLUtils.WebGLUtils.convert (cyclomatic 126) src/renderers/webgl/WebGLUtils.js:6 — WebGLUtils.WebGLUtils.convert has cyclomatic complexity 126 (threshold 15). To reduce it, separate the cases: extract each independent 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 · Material.toJSON (cyclomatic 117) · ×1
  • Material.toJSON (cyclomatic 117) src/materials/Material.js:610 — Material.toJSON has cyclomatic complexity 117 (threshold 15). Of this number, 116 points are the body's own statements and 1 belongs 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 · WebGPUTextureUtils.getFormat (cyclomatic 115) · ×1
  • WebGPUTextureUtils.getFormat (cyclomatic 115) src/renderers/webgpu/utils/WebGPUTextureUtils.js:1481 — WebGPUTextureUtils.getFormat has cyclomatic complexity 115 (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 · Guide.init (cyclomatic 109) · ×1
  • Guide.init (cyclomatic 109) REDACTED:245 — Guide.init has cyclomatic complexity 109 (threshold 15). Of this number, 23 points are the body's own statements and 86 belong to 24 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 · ObjectLoader.parseObject (cyclomatic 102) · ×1
  • ObjectLoader.parseObject (cyclomatic 102) src/loaders/ObjectLoader.js:784 — ObjectLoader.parseObject has cyclomatic complexity 102 (threshold 15). Of this number, 93 points are the body's own statements and 9 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 · WebGLPrograms.WebGLPrograms.getParameters (cyclomatic 100) · ×1
  • WebGLPrograms.WebGLPrograms.getParameters (cyclomatic 100) src/renderers/webgl/WebGLPrograms.js:54 — WebGLPrograms.WebGLPrograms.getParameters has cyclomatic complexity 100 (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 · WebGLPrograms.getParameters (cyclomatic 100) · ×1
  • WebGLPrograms.getParameters (cyclomatic 100) src/renderers/webgl/WebGLPrograms.js:54 — WebGLPrograms.getParameters has cyclomatic complexity 100 (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 · Viewport.Viewport (cyclomatic 98) · ×1
  • Viewport.Viewport (cyclomatic 98) editor/js/Viewport.js:25 — Viewport.Viewport has cyclomatic complexity 98 (threshold 15). Most of this is not in the body itself: 1 of the 98 points is its own statement and the rest belongs to 32 function items inside it that branch (a function literal at line 493, a function literal at line 105, a function literal at line 348, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Loader.Loader (cyclomatic 96) · ×1
  • Loader.Loader (cyclomatic 96) editor/js/Loader.js:14 — Loader.Loader has cyclomatic complexity 96 (threshold 15). Most of this is not in the body itself: 5 of the 96 points are its own statements and the rest belongs to 21 function items inside it that branch (a function literal at line 161, handleZIP, handleJSON, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · WebGLTextureUtils.getInternalFormat (cyclomatic 93) · ×1
  • WebGLTextureUtils.getInternalFormat (cyclomatic 93) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:165 — WebGLTextureUtils.getInternalFormat has cyclomatic complexity 93 (threshold 15). To reduce it, separate the cases: extract each independent 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 · renderPage (cyclomatic 87) · ×1
  • renderPage (cyclomatic 87) REDACTED:1231 — renderPage has cyclomatic complexity 87 (threshold 15). Of this number, 48 points are the body's own statements and 39 belong to 34 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 · NodeMaterialObserver.equals (cyclomatic 76) · ×1
  • NodeMaterialObserver.equals (cyclomatic 76) src/materials/nodes/manager/NodeMaterialObserver.js:597 — NodeMaterialObserver.equals has cyclomatic complexity 76 (threshold 15). To reduce it, separate the cases: extract each independent 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 · (anonymous) (cyclomatic 73) · ×1
  • (anonymous) (cyclomatic 73) editor/js/libs/codemirror/codemirror.js:370 — (anonymous) has cyclomatic complexity 73 (threshold 15). Most of this is not in the body itself: 1 of the 73 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 393, charType, BidiSpan). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · CodeRunner.run (cyclomatic 66) · ×1
  • CodeRunner.run (cyclomatic 66) REDACTED:897 — CodeRunner.run has cyclomatic complexity 66 (threshold 15). Of this number, 60 points are the body's own statements and 6 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 · MaterialNode.setup (cyclomatic 65) · ×1
  • MaterialNode.setup (cyclomatic 65) src/nodes/accessors/MaterialNode.js:120 — MaterialNode.setup has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent 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 · Sidebar.Scene.SidebarScene (cyclomatic 63) · ×1
  • Sidebar.Scene.SidebarScene (cyclomatic 63) editor/js/Sidebar.Scene.js:6 — Sidebar.Scene.SidebarScene has cyclomatic complexity 63 (threshold 15). Most of this is not in the body itself: 1 of the 63 points is its own statement and the rest belongs to 17 function items inside it that branch (refreshUI, a function literal at line 596, a function literal at line 134, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · codemirror.insertLineContent (cyclomatic 56) · ×1
  • codemirror.insertLineContent (cyclomatic 56) editor/js/libs/codemirror/codemirror.js:1921 — codemirror.insertLineContent 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 · CodeEditor._initMonaco (cyclomatic 54) · ×1
  • CodeEditor._initMonaco (cyclomatic 54) tsl/js/editor/CodeEditor.js:253 — CodeEditor._initMonaco has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 1 of the 54 points is its own statement and the rest belongs to 16 function literals inside it that branch (lines 255, 302, 527, …). 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 · WebGPUTextureUtils._getBlockData (cyclomatic 53) · ×1
  • WebGPUTextureUtils._getBlockData (cyclomatic 53) src/renderers/webgpu/utils/WebGPUTextureUtils.js:1212 — WebGPUTextureUtils._getBlockData has cyclomatic complexity 53 (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 · WebGLRenderer.constructor (cyclomatic 53) · ×1
  • WebGLRenderer.constructor (cyclomatic 53) src/renderers/WebGLRenderer.js:71 — WebGLRenderer.constructor has cyclomatic complexity 53 (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. This shape REPEATS in the file: 4 other methods here (WebGLRenderer.constructor::projectObject, WebGLRenderer.constructor::renderTransmissionPass, WebGLRenderer.constructor::getProgram, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
D1 · Cyclomatic Complexity · codemirror.drawSelectionRange (cyclomatic 52) · ×1
  • codemirror.drawSelectionRange (cyclomatic 52) editor/js/libs/codemirror/codemirror.js:3204 — codemirror.drawSelectionRange has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 7 of the 52 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 3234, drawForLine::wrapX, add, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · WebGLPrograms.WebGLPrograms.getProgramCacheKeyBooleans (cyclomatic 51) · ×1
  • WebGLPrograms.WebGLPrograms.getProgramCacheKeyBooleans (cyclomatic 51) src/renderers/webgl/WebGLPrograms.js:508 — WebGLPrograms.WebGLPrograms.getProgramCacheKeyBooleans has cyclomatic complexity 51 (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 · ConsoleManager._initConsoleOverrides (cyclomatic 51) · ×1
  • ConsoleManager._initConsoleOverrides (cyclomatic 51) tsl/js/managers/ConsoleManager.js:16 — ConsoleManager._initConsoleOverrides has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 11 of the 51 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 21, 113, 56, …). 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 · WebGLPrograms.getProgramCacheKeyBooleans (cyclomatic 51) · ×1
  • WebGLPrograms.getProgramCacheKeyBooleans (cyclomatic 51) src/renderers/webgl/WebGLPrograms.js:508 — WebGLPrograms.getProgramCacheKeyBooleans has cyclomatic complexity 51 (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 · CodeRunner.load (cyclomatic 50) · ×1
  • CodeRunner.load (cyclomatic 50) REDACTED:584 — CodeRunner.load has cyclomatic complexity 50 (threshold 15). Of this number, 20 points are the body's own statements and 30 belong to 3 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 · Object3D.toJSON (cyclomatic 49) · ×1
  • Object3D.toJSON (cyclomatic 49) src/core/Object3D.js:1294 — Object3D.toJSON has cyclomatic complexity 49 (threshold 15). Of this number, 45 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebGLBackend._setFramebuffer (cyclomatic 49) · ×1
  • WebGLBackend._setFramebuffer (cyclomatic 49) src/renderers/webgl-fallback/WebGLBackend.js:2299 — WebGLBackend._setFramebuffer has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent 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.Script (cyclomatic 47) · ×1
  • Script.Script (cyclomatic 47) editor/js/Script.js:8 — Script.Script has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 12 function items inside it that branch (a function literal at line 151, a function literal at line 425, a function literal at line 83, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · OperatorNode.generate (cyclomatic 47) · ×1
  • OperatorNode.generate (cyclomatic 47) src/nodes/math/OperatorNode.js:195 — OperatorNode.generate has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent 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 · WebGPUTextureUtils._getBytesPerTexel (cyclomatic 47) · ×1
  • WebGPUTextureUtils._getBytesPerTexel (cyclomatic 47) src/renderers/webgpu/utils/WebGPUTextureUtils.js:1323 — WebGPUTextureUtils._getBytesPerTexel has cyclomatic complexity 47 (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 · WebGPUTextureUtils._getTypedArrayType (cyclomatic 47) · ×1
  • WebGPUTextureUtils._getTypedArrayType (cyclomatic 47) src/renderers/webgpu/utils/WebGPUTextureUtils.js:1392 — WebGPUTextureUtils._getTypedArrayType has cyclomatic complexity 47 (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 · tern.findCompletions (cyclomatic 46) · ×1
  • tern.findCompletions (cyclomatic 46) editor/js/libs/ternjs/tern.js:594 — tern.findCompletions has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (tern.findCompletions::gather) 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.
D1 · Cyclomatic Complexity · codemirror.markText (cyclomatic 44) · ×1
  • codemirror.markText (cyclomatic 44) editor/js/libs/codemirror/codemirror.js:5970 — codemirror.markText has cyclomatic complexity 44 (threshold 15). Of this number, 34 points are the body's own statements and 10 belong to 2 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 · ExtrudeGeometry.constructor · ×1
  • ExtrudeGeometry.constructor::addShape (cyclomatic 44) src/geometries/ExtrudeGeometry.js:81 — ExtrudeGeometry.constructor::addShape has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent 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 · prettify.numberLines (cyclomatic 43) · ×1
  • prettify.numberLines (cyclomatic 43) REDACTED:991 — prettify.numberLines has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 14 of the 43 points are its own statements and the rest belongs to 5 function items inside it that branch (walk, findTextWithPrefix, breakAfter, …). 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 · Textures.updateTexture (cyclomatic 43) · ×1
  • Textures.updateTexture (cyclomatic 43) src/renderers/common/Textures.js:276 — Textures.updateTexture has cyclomatic complexity 43 (threshold 15). Of this number, 41 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 · earcut.isEarHashed (cyclomatic 42) · ×1
  • earcut.isEarHashed (cyclomatic 42) src/extras/lib/earcut.js:163 — earcut.isEarHashed has cyclomatic complexity 42 (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 · Node.build (cyclomatic 42) · ×1
  • Node.build (cyclomatic 42) src/nodes/core/Node.js:1122 — Node.build 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 · MarkdownUtils.parse (cyclomatic 42) · ×1
  • MarkdownUtils.parse (cyclomatic 42) tsl/js/utils/MarkdownUtils.js:283 — MarkdownUtils.parse has cyclomatic complexity 42 (threshold 15). Of this number, 32 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirror.findPosH (cyclomatic 41) · ×1
  • codemirror.findPosH (cyclomatic 41) editor/js/libs/codemirror/codemirror.js:8710 — codemirror.findPosH has cyclomatic complexity 41 (threshold 15). Of this number, 28 points are the body's own statements and 13 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WGSLNodeBuilder.getUniforms (cyclomatic 41) · ×1
  • WGSLNodeBuilder.getUniforms (cyclomatic 41) src/renderers/webgpu/nodes/WGSLNodeBuilder.js:2204 — WGSLNodeBuilder.getUniforms has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent 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 · (anonymous) (cyclomatic 41) · ×1
  • (anonymous) (cyclomatic 41) editor/js/libs/codemirror/codemirror.js:14 — (anonymous) has cyclomatic complexity 41 (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 · WebGPUBindingUtils._createLayoutEntries (cyclomatic 40) · ×1
  • WebGPUBindingUtils._createLayoutEntries (cyclomatic 40) src/renderers/webgpu/utils/WebGPUBindingUtils.js:420 — WebGPUBindingUtils._createLayoutEntries 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 · prettify.$prettyPrint · ×1
  • prettify.$prettyPrint::doWork (cyclomatic 39) REDACTED:1532 — prettify.$prettyPrint::doWork has cyclomatic complexity 39 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · WebGLBackend.draw (cyclomatic 39) · ×1
  • WebGLBackend.draw (cyclomatic 39) src/renderers/webgl-fallback/WebGLBackend.js:1129 — WebGLBackend.draw has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LayoutManager.setupResizer (cyclomatic 39) · ×1
  • LayoutManager.setupResizer (cyclomatic 39) tsl/js/managers/LayoutManager.js:116 — LayoutManager.setupResizer has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 12 of the 39 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 126, 335, 210, …). 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 · copyTextureToTexture (cyclomatic 39) · ×1
  • copyTextureToTexture (cyclomatic 39) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:857 — copyTextureToTexture has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebGLShadowMap · ×1
  • WebGLShadowMap::render (cyclomatic 39) src/renderers/webgl/WebGLShadowMap.js:92 — WebGLShadowMap::render has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirror.moveVisually (cyclomatic 37) · ×1
  • codemirror.moveVisually (cyclomatic 37) editor/js/libs/codemirror/codemirror.js:6914 — codemirror.moveVisually has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 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 · WebGLOutput.WebGLOutput (cyclomatic 37) · ×1
  • WebGLOutput.WebGLOutput (cyclomatic 37) src/renderers/webgl/WebGLOutput.js:34 — WebGLOutput.WebGLOutput has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 10 of the 37 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 144, 242, 198, …). 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 · WebGLLights.WebGLLights.setup (cyclomatic 37) · ×1
  • WebGLLights.WebGLLights.setup (cyclomatic 37) src/renderers/webgl/WebGLLights.js:221 — WebGLLights.WebGLLights.setup has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Guide.setupTOC (cyclomatic 37) · ×1
  • Guide.setupTOC (cyclomatic 37) REDACTED:2043 — Guide.setupTOC has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 14 of the 37 points are its own statements and the rest belongs to 7 function items inside it that branch (createTOCNode, a function literal at line 2199, a function literal at line 2227, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · publish.publish (cyclomatic 37) · ×1
  • publish.publish (cyclomatic 37) utils/docs/template/publish.js:655 — publish.publish has cyclomatic complexity 37 (threshold 15). Of this number, 16 points are the body's own statements and 21 belong to 7 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 · WebGLLights.setup (cyclomatic 37) · ×1
  • WebGLLights.setup (cyclomatic 37) src/renderers/webgl/WebGLLights.js:221 — WebGLLights.setup has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeBuilder.generateConst (cyclomatic 36) · ×1
  • NodeBuilder.generateConst (cyclomatic 36) src/nodes/core/NodeBuilder.js:1555 — NodeBuilder.generateConst has cyclomatic complexity 36 (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 · WebGPUTextureUtils.createTexture (cyclomatic 36) · ×1
  • WebGPUTextureUtils.createTexture (cyclomatic 36) src/renderers/webgpu/utils/WebGPUTextureUtils.js:302 — WebGPUTextureUtils.createTexture has cyclomatic complexity 36 (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 · EditorControls.constructor (cyclomatic 35) · ×1
  • EditorControls.constructor (cyclomatic 35) editor/js/EditorControls.js:5 — EditorControls.constructor has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 17 function items inside it that branch (onPointerDown, onMouseDown, onMouseMove, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Sidebar.Material.SidebarMaterial (cyclomatic 35) · ×1
  • Sidebar.Material.SidebarMaterial (cyclomatic 35) editor/js/Sidebar.Material.js:15 — Sidebar.Material.SidebarMaterial has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 6 function items inside it that branch (update, refreshUI, a function literal at line 654, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Animation.Animation (cyclomatic 35) · ×1
  • Animation.Animation (cyclomatic 35) editor/js/Animation.js:5 — Animation.Animation has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 15 function items inside it that branch (update, a function literal at line 51, getObjectName, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · codemirror.measureCharInner (cyclomatic 35) · ×1
  • codemirror.measureCharInner (cyclomatic 35) editor/js/libs/codemirror/codemirror.js:2489 — codemirror.measureCharInner 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 · ShapePath.toShapes (cyclomatic 35) · ×1
  • ShapePath.toShapes (cyclomatic 35) src/extras/core/ShapePath.js:146 — ShapePath.toShapes has cyclomatic complexity 35 (threshold 15). Of this number, 28 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Renderer._projectObject (cyclomatic 35) · ×1
  • Renderer._projectObject (cyclomatic 35) src/renderers/common/Renderer.js:3532 — Renderer._projectObject 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 · codemirror.onScrollWheel (cyclomatic 34) · ×1
  • codemirror.onScrollWheel (cyclomatic 34) editor/js/libs/codemirror/codemirror.js:4511 — codemirror.onScrollWheel has cyclomatic complexity 34 (threshold 15). Of this number, 27 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 · ObjectLoader.parseTextures (cyclomatic 34) · ×1
  • ObjectLoader.parseTextures (cyclomatic 34) src/loaders/ObjectLoader.js:674 — ObjectLoader.parseTextures has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Info._getTextureMemorySize (cyclomatic 34) · ×1
  • Info._getTextureMemorySize (cyclomatic 34) src/renderers/common/Info.js:449 — Info._getTextureMemorySize has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WebGLTextureUtils.updateTexture (cyclomatic 34) · ×1
  • WebGLTextureUtils.updateTexture (cyclomatic 34) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:530 — WebGLTextureUtils.updateTexture 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 · WebGPUBackend._getRenderPassDescriptor (cyclomatic 34) · ×1
  • WebGPUBackend._getRenderPassDescriptor (cyclomatic 34) src/renderers/webgpu/WebGPUBackend.js:670 — WebGPUBackend._getRenderPassDescriptor 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. This is NOT this file's highest cyclomatic complexity: WebGPUBackend.needsRenderUpdate (cyclomatic 38) 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 · WebGPUBackend.beginRender (cyclomatic 34) · ×1
  • WebGPUBackend.beginRender (cyclomatic 34) src/renderers/webgpu/WebGPUBackend.js:882 — WebGPUBackend.beginRender 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. This is NOT this file's highest cyclomatic complexity: WebGPUBackend.needsRenderUpdate (cyclomatic 38) 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 · packLDrawModel.parseObject (cyclomatic 34) · ×1
  • packLDrawModel.parseObject (cyclomatic 34) utils/packLDrawModel.mjs:93 — packLDrawModel.parseObject 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 · codemirror.leftButtonSelect (cyclomatic 33) · ×1
  • codemirror.leftButtonSelect (cyclomatic 33) editor/js/libs/codemirror/codemirror.js:7477 — codemirror.leftButtonSelect has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 6 function items inside it that branch (extendTo, extend, a function literal at line 7603, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · tern.findCompletions · ×1
  • tern.findCompletions::gather (cyclomatic 33) editor/js/libs/ternjs/tern.js:609 — tern.findCompletions::gather 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. This shape REPEATS in the file: one other method here (tern.findCompletions) 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.
D1 · Cyclomatic Complexity · Renderer._renderScene (cyclomatic 33) · ×1
  • Renderer._renderScene (cyclomatic 33) src/renderers/common/Renderer.js:1931 — Renderer._renderScene has cyclomatic complexity 33 (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 · WebGPUPipelineUtils.createRenderPipeline (cyclomatic 33) · ×1
  • WebGPUPipelineUtils.createRenderPipeline (cyclomatic 33) src/renderers/webgpu/utils/WebGPUPipelineUtils.js:71 — WebGPUPipelineUtils.createRenderPipeline has cyclomatic complexity 33 (threshold 15). Of this number, 23 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 · CodeCompiler.renameIdentifier · ×1
  • CodeCompiler.renameIdentifier::walk (cyclomatic 33) tsl/js/code/CodeCompiler.js:71 — CodeCompiler.renameIdentifier::walk 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 · Sidebar.Material.MapProperty.SidebarMaterialMapProperty (cyclomatic 32) · ×1
  • Sidebar.Material.MapProperty.SidebarMaterialMapProperty (cyclomatic 32) editor/js/Sidebar.Material.MapProperty.js:11 — Sidebar.Material.MapProperty.SidebarMaterialMapProperty has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 7 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (update, onChange, onMapChange, …). 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 · Sidebar.Settings.Shortcuts.SidebarSettingsShortcuts (cyclomatic 32) · ×1
  • Sidebar.Settings.Shortcuts.SidebarSettingsShortcuts (cyclomatic 32) editor/js/Sidebar.Settings.Shortcuts.js:6 — Sidebar.Settings.Shortcuts.SidebarSettingsShortcuts has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 99, a function literal at line 37, a function literal at line 58, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · codemirror.stretchSpansOverChange (cyclomatic 32) · ×1
  • codemirror.stretchSpansOverChange (cyclomatic 32) editor/js/libs/codemirror/codemirror.js:1372 — codemirror.stretchSpansOverChange 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 · codemirror.buildToken (cyclomatic 32) · ×1
  • codemirror.buildToken (cyclomatic 32) editor/js/libs/codemirror/codemirror.js:1801 — codemirror.buildToken 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 · codemirror.registerEventHandlers (cyclomatic 32) · ×1
  • codemirror.registerEventHandlers (cyclomatic 32) editor/js/libs/codemirror/codemirror.js:7962 — codemirror.registerEventHandlers has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 8020, a function literal at line 8004, a function literal at line 7967, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · codemirror.ContentEditableInput.pollContent (cyclomatic 32) · ×1
  • codemirror.ContentEditableInput.pollContent (cyclomatic 32) editor/js/libs/codemirror/codemirror.js:9060 — codemirror.ContentEditableInput.pollContent has cyclomatic complexity 32 (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 · make-geo-picking-texture.main (cyclomatic 32) · ×1
  • make-geo-picking-texture.main (cyclomatic 32) manual/resources/tools/geo-picking/make-geo-picking-texture.js:7 — make-geo-picking-texture.main has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 belong to 3 function items inside it that branch. 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 · OperatorNode.generateNodeType (cyclomatic 32) · ×1
  • OperatorNode.generateNodeType (cyclomatic 32) src/nodes/math/OperatorNode.js:109 — OperatorNode.generateNodeType 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 · LoopNode.generate (cyclomatic 32) · ×1
  • LoopNode.generate (cyclomatic 32) src/nodes/utils/LoopNode.js:155 — LoopNode.generate has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · codemirror.skipAtomicInner (cyclomatic 31) · ×1
  • codemirror.skipAtomicInner (cyclomatic 31) editor/js/libs/codemirror/codemirror.js:5204 — codemirror.skipAtomicInner 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 · FileLoader.load (cyclomatic 31) · ×1
  • FileLoader.load (cyclomatic 31) src/loaders/FileLoader.js:78 — FileLoader.load has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 144, 227, 183, …). 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 · Textures.updateRenderTarget (cyclomatic 31) · ×1
  • Textures.updateRenderTarget (cyclomatic 31) src/renderers/common/Textures.js:131 — Textures.updateRenderTarget has cyclomatic complexity 31 (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 · WebGLBackend._resolveRenderTarget (cyclomatic 31) · ×1
  • WebGLBackend._resolveRenderTarget (cyclomatic 31) src/renderers/webgl-fallback/WebGLBackend.js:2705 — WebGLBackend._resolveRenderTarget 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 · MenubarFile (cyclomatic 31) · ×1
  • MenubarFile (cyclomatic 31) editor/js/Menubar.File.js:4 — MenubarFile has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 34 function items inside it that branch (a function literal at line 513, a function literal at line 541, a function literal at line 275, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · codemirror.TextMarker.clear (cyclomatic 30) · ×1
  • codemirror.TextMarker.clear (cyclomatic 30) editor/js/libs/codemirror/codemirror.js:5860 — codemirror.TextMarker.clear 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 · Renderer.compileAsync (cyclomatic 30) · ×1
  • Renderer.compileAsync (cyclomatic 30) src/renderers/common/Renderer.js:984 — Renderer.compileAsync has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to 3 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 · WebGPUBackend.draw (cyclomatic 30) · ×1
  • WebGPUBackend.draw (cyclomatic 30) src/renderers/webgpu/WebGPUBackend.js:2235 — WebGPUBackend.draw 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. This is NOT this file's highest cyclomatic complexity: WebGPUBackend.needsRenderUpdate (cyclomatic 38) 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 · WebGLBindingStates.WebGLBindingStates.setupVertexAttributes (cyclomatic 30) · ×1
  • WebGLBindingStates.WebGLBindingStates.setupVertexAttributes (cyclomatic 30) src/renderers/webgl/WebGLBindingStates.js:315 — WebGLBindingStates.WebGLBindingStates.setupVertexAttributes 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 · WebXRManager.constructor · ×1
  • WebXRManager.constructor::onAnimationFrame (cyclomatic 30) src/renderers/webxr/WebXRManager.js:854 — WebXRManager.constructor::onAnimationFrame 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 · CodeRunner.serializeArg (cyclomatic 30) · ×1
  • CodeRunner.serializeArg (cyclomatic 30) REDACTED:288 — CodeRunner.serializeArg 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 · ProjectsManager.openProjectsModal (cyclomatic 30) · ×1
  • ProjectsManager.openProjectsModal (cyclomatic 30) tsl/js/managers/ProjectsManager.js:585 — ProjectsManager.openProjectsModal has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 10 function items inside it that branch (renderTopSection, a function literal at line 740, a function literal at line 830, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · WebGLBindingStates.setupVertexAttributes (cyclomatic 30) · ×1
  • WebGLBindingStates.setupVertexAttributes (cyclomatic 30) src/renderers/webgl/WebGLBindingStates.js:315 — WebGLBindingStates.setupVertexAttributes 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 · build-defs.buildDefs (cyclomatic 29) · ×1
  • build-defs.buildDefs (cyclomatic 29) editor/js/libs/tern-threejs/build-defs.js:107 — build-defs.buildDefs 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 · Sidebar.Project.Resources.SidebarProjectResources (cyclomatic 29) · ×1
  • Sidebar.Project.Resources.SidebarProjectResources (cyclomatic 29) editor/js/Sidebar.Project.Resources.js:6 — Sidebar.Project.Resources.SidebarProjectResources has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 5 function items inside it that branch (getTextureType, refreshTexturesUI, a function literal at line 207, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PropertyBinding.bind (cyclomatic 29) · ×1
  • PropertyBinding.bind (cyclomatic 29) REDACTED:487 — PropertyBinding.bind 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 · ShadowNode.setupShadow (cyclomatic 29) · ×1
  • ShadowNode.setupShadow (cyclomatic 29) src/nodes/lighting/ShadowNode.js:355 — ShadowNode.setupShadow has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 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 · WebGLBackend.clear (cyclomatic 29) · ×1
  • WebGLBackend.clear (cyclomatic 29) src/renderers/webgl-fallback/WebGLBackend.js:792 — WebGLBackend.clear 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 · WebGPUBackend.finishRender (cyclomatic 29) · ×1
  • WebGPUBackend.finishRender (cyclomatic 29) src/renderers/webgpu/WebGPUBackend.js:1414 — WebGPUBackend.finishRender 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. This is NOT this file's highest cyclomatic complexity: WebGPUBackend.needsRenderUpdate (cyclomatic 38) 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 · WebGLState.WebGLState.setBlending (cyclomatic 29) · ×1
  • WebGLState.WebGLState.setBlending (cyclomatic 29) src/renderers/webgl/WebGLState.js:609 — WebGLState.WebGLState.setBlending 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 · SearchManager.calculateScore (cyclomatic 29) · ×1
  • SearchManager.calculateScore (cyclomatic 29) REDACTED:76 — SearchManager.calculateScore 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 · codemirror.makeChangeFromHistory (cyclomatic 28) · ×1
  • codemirror.makeChangeFromHistory (cyclomatic 28) editor/js/libs/codemirror/codemirror.js:5343 — codemirror.makeChangeFromHistory has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirror.applyTextInput (cyclomatic 28) · ×1
  • codemirror.applyTextInput (cyclomatic 28) editor/js/libs/codemirror/codemirror.js:8148 — codemirror.applyTextInput 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 · codemirror.locateNodeInLineView (cyclomatic 28) · ×1
  • codemirror.locateNodeInLineView (cyclomatic 28) editor/js/libs/codemirror/codemirror.js:9282 — codemirror.locateNodeInLineView has cyclomatic complexity 28 (threshold 15). Of this number, 18 points are the body's own statements and 10 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirror.TextareaInput.onContextMenu (cyclomatic 28) · ×1
  • codemirror.TextareaInput.onContextMenu (cyclomatic 28) editor/js/libs/codemirror/codemirror.js:9610 — codemirror.TextareaInput.onContextMenu has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to 3 function items inside it that branch (rehide, rehide::poll, prepareSelectAllHack). 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 · ProjectsManager.importProjectJSON (cyclomatic 28) · ×1
  • ProjectsManager.importProjectJSON (cyclomatic 28) tsl/js/managers/ProjectsManager.js:478 — ProjectsManager.importProjectJSON has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 483, 480). 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 · importProjectJSON · ×1
  • importProjectJSON::(anonymous)::onload (cyclomatic 28) tsl/js/managers/ProjectsManager.js:483 — importProjectJSON::(anonymous)::onload 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 · parsePath (cyclomatic 28) · ×1
  • parsePath (cyclomatic 28) editor/js/libs/ternjs/def.js:290 — parsePath 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 · codemirror.updateDisplayIfNeeded (cyclomatic 27) · ×1
  • codemirror.updateDisplayIfNeeded (cyclomatic 27) editor/js/libs/codemirror/codemirror.js:4106 — codemirror.updateDisplayIfNeeded has cyclomatic complexity 27 (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 · BufferGeometryLoader.parse (cyclomatic 27) · ×1
  • BufferGeometryLoader.parse (cyclomatic 27) src/loaders/BufferGeometryLoader.js:90 — BufferGeometryLoader.parse has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebGPUTextureUtils.updateTexture (cyclomatic 27) · ×1
  • WebGPUTextureUtils.updateTexture (cyclomatic 27) src/renderers/webgpu/utils/WebGPUTextureUtils.js:643 — WebGPUTextureUtils.updateTexture 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 · WebGPUBackend._draw (cyclomatic 27) · ×1
  • WebGPUBackend._draw (cyclomatic 27) src/renderers/webgpu/WebGPUBackend.js:2042 — WebGPUBackend._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. This is NOT this file's highest cyclomatic complexity: WebGPUBackend.needsRenderUpdate (cyclomatic 38) 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 · findHoleBridge (cyclomatic 27) · ×1
  • findHoleBridge (cyclomatic 27) src/extras/lib/earcut.js:314 — findHoleBridge 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 · codemirror.ContentEditableInput.showPrimarySelection (cyclomatic 26) · ×1
  • codemirror.ContentEditableInput.showPrimarySelection (cyclomatic 26) editor/js/libs/codemirror/codemirror.js:8919 — codemirror.ContentEditableInput.showPrimarySelection 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 · codemirror.TextareaInput.poll (cyclomatic 26) · ×1
  • codemirror.TextareaInput.poll (cyclomatic 26) editor/js/libs/codemirror/codemirror.js:9550 — codemirror.TextareaInput.poll has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tern.resolveFile (cyclomatic 26) · ×1
  • tern.resolveFile (cyclomatic 26) editor/js/libs/ternjs/tern.js:366 — tern.resolveFile has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 384). 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 · WebXRController.update (cyclomatic 26) · ×1
  • WebXRController.update (cyclomatic 26) src/renderers/webxr/WebXRController.js:224 — WebXRController.update 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 · TextureNode.generate (cyclomatic 26) · ×1
  • TextureNode.generate (cyclomatic 26) src/nodes/accessors/TextureNode.js:658 — TextureNode.generate 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 · Bindings._update (cyclomatic 26) · ×1
  • Bindings._update (cyclomatic 26) src/renderers/common/Bindings.js:450 — Bindings._update 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 · MarkdownUtils.renderSingleApiCard (cyclomatic 26) · ×1
  • MarkdownUtils.renderSingleApiCard (cyclomatic 26) tsl/js/utils/MarkdownUtils.js:999 — MarkdownUtils.renderSingleApiCard has cyclomatic complexity 26 (threshold 15). Of this number, 22 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 · SearchManager.scrollToSearchMatch (cyclomatic 26) · ×1
  • SearchManager.scrollToSearchMatch (cyclomatic 26) REDACTED:345 — SearchManager.scrollToSearchMatch has cyclomatic complexity 26 (threshold 15). Of this number, 25 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 · codemirror.regChange (cyclomatic 25) · ×1
  • codemirror.regChange (cyclomatic 25) editor/js/libs/codemirror/codemirror.js:3004 — codemirror.regChange 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 · TextureNode.setup (cyclomatic 25) · ×1
  • TextureNode.setup (cyclomatic 25) src/nodes/accessors/TextureNode.js:451 — TextureNode.setup has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 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 · NodeBuilder._resolveLayoutDefaults (cyclomatic 25) · ×1
  • NodeBuilder._resolveLayoutDefaults (cyclomatic 25) src/nodes/core/NodeBuilder.js:2891 — NodeBuilder._resolveLayoutDefaults has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (walk, a function literal at line 2897, a function literal at line 2903). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · XRManager.onAnimationFrame (cyclomatic 25) · ×1
  • XRManager.onAnimationFrame (cyclomatic 25) src/renderers/common/XRManager.js:1772 — XRManager.onAnimationFrame has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent 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 · Renderer._getShadowNodes (cyclomatic 25) · ×1
  • Renderer._getShadowNodes (cyclomatic 25) src/renderers/common/Renderer.js:3788 — Renderer._getShadowNodes has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent 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 · GLSLNodeBuilder.getUniforms (cyclomatic 25) · ×1
  • GLSLNodeBuilder.getUniforms (cyclomatic 25) src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:935 — GLSLNodeBuilder.getUniforms has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent 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 · WGSLNodeBuilder.getUniformFromNode (cyclomatic 25) · ×1
  • WGSLNodeBuilder.getUniformFromNode (cyclomatic 25) src/renderers/webgpu/nodes/WGSLNodeBuilder.js:1377 — WGSLNodeBuilder.getUniformFromNode has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent 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 · changelog.processCommit (cyclomatic 25) · ×1
  • changelog.processCommit (cyclomatic 25) utils/changelog.js:402 — changelog.processCommit has cyclomatic complexity 25 (threshold 15). Of this number, 24 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 · codemirror.onKeyDown (cyclomatic 24) · ×1
  • codemirror.onKeyDown (cyclomatic 24) editor/js/libs/codemirror/codemirror.js:7244 — codemirror.onKeyDown has cyclomatic complexity 24 (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 · infer.similarType (cyclomatic 24) · ×1
  • infer.similarType (cyclomatic 24) editor/js/libs/ternjs/infer.js:216 — infer.similarType 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 · infer.canonicalType (cyclomatic 24) · ×1
  • infer.canonicalType (cyclomatic 24) editor/js/libs/ternjs/infer.js:263 — infer.canonicalType 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 · BatchedMesh._updateDrawParameters (cyclomatic 24) · ×1
  • BatchedMesh._updateDrawParameters (cyclomatic 24) src/objects/BatchedMesh.js:1543 — BatchedMesh._updateDrawParameters 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 · MeshPhysicalNodeMaterial.setupVariants (cyclomatic 24) · ×1
  • MeshPhysicalNodeMaterial.setupVariants (cyclomatic 24) src/materials/nodes/MeshPhysicalNodeMaterial.js:427 — MeshPhysicalNodeMaterial.setupVariants 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 · Renderer.renderObject (cyclomatic 24) · ×1
  • Renderer.renderObject (cyclomatic 24) src/renderers/common/Renderer.js:4017 — Renderer.renderObject 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 · WebGPUAttributeUtils.createAttribute (cyclomatic 24) · ×1
  • WebGPUAttributeUtils.createAttribute (cyclomatic 24) src/renderers/webgpu/utils/WebGPUAttributeUtils.js:104 — WebGPUAttributeUtils.createAttribute 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 · WebGLMorphtargets.WebGLMorphtargets.update (cyclomatic 24) · ×1
  • WebGLMorphtargets.WebGLMorphtargets.update (cyclomatic 24) src/renderers/webgl/WebGLMorphtargets.js:11 — WebGLMorphtargets.WebGLMorphtargets.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 · CodeCompiler.compile · ×1
  • CodeCompiler.compile::parseFile::processNode (cyclomatic 24) tsl/js/code/CodeCompiler.js:760 — CodeCompiler.compile::parseFile::processNode 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 · PlaygroundManager.renderPlaygroundTabs (cyclomatic 24) · ×1
  • PlaygroundManager.renderPlaygroundTabs (cyclomatic 24) tsl/js/managers/PlaygroundManager.js:273 — PlaygroundManager.renderPlaygroundTabs has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 398, a function literal at line 505, a function literal at line 348, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Guide.updateUI (cyclomatic 24) · ×1
  • Guide.updateUI (cyclomatic 24) REDACTED:1949 — Guide.updateUI has cyclomatic complexity 24 (threshold 15). Of this number, 17 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 · Sidebar.Geometry.SidebarGeometry (cyclomatic 23) · ×1
  • Sidebar.Geometry.SidebarGeometry (cyclomatic 23) editor/js/Sidebar.Geometry.js:12 — Sidebar.Geometry.SidebarGeometry has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 7 function items inside it that branch (build, refreshUI, a function literal at line 151, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · codemirror.buildLineContent (cyclomatic 23) · ×1
  • codemirror.buildLineContent (cyclomatic 23) editor/js/libs/codemirror/codemirror.js:1734 — codemirror.buildLineContent 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 · codemirror.onDrop (cyclomatic 23) · ×1
  • codemirror.onDrop (cyclomatic 23) editor/js/libs/codemirror/codemirror.js:6534 — codemirror.onDrop has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirror.indentLine (cyclomatic 23) · ×1
  • codemirror.indentLine (cyclomatic 23) editor/js/libs/codemirror/codemirror.js:8080 — codemirror.indentLine 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 · comment.commentsBefore (cyclomatic 23) · ×1
  • comment.commentsBefore (cyclomatic 23) editor/js/libs/ternjs/comment.js:22 — comment.commentsBefore 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 · PolyhedronGeometry.constructor (cyclomatic 23) · ×1
  • PolyhedronGeometry.constructor (cyclomatic 23) src/geometries/PolyhedronGeometry.js:23 — PolyhedronGeometry.constructor 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 7 function items inside it that branch (subdivideFace, correctSeam, correctUV, …). 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 · Morph.morphReference (cyclomatic 23) · ×1
  • Morph.morphReference (cyclomatic 23) src/nodes/accessors/Morph.js:227 — Morph.morphReference has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 belong to 3 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 · WebGLMaterials.WebGLMaterials.refreshUniformsPhysical (cyclomatic 23) · ×1
  • WebGLMaterials.WebGLMaterials.refreshUniformsPhysical (cyclomatic 23) src/renderers/webgl/WebGLMaterials.js:413 — WebGLMaterials.WebGLMaterials.refreshUniformsPhysical 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 · MarkdownUtils.parseGuide · ×1
  • MarkdownUtils.parseGuide::flatten (cyclomatic 23) tsl/js/utils/MarkdownUtils.js:131 — MarkdownUtils.parseGuide::flatten 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. This shape REPEATS in the file: one other method here (MarkdownUtils.parseGuide) 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.
D1 · Cyclomatic Complexity · MarkdownUtils.splitArguments (cyclomatic 23) · ×1
  • MarkdownUtils.splitArguments (cyclomatic 23) tsl/js/utils/MarkdownUtils.js:648 — MarkdownUtils.splitArguments 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 · MarkdownUtils.renderApiTableCard (cyclomatic 23) · ×1
  • MarkdownUtils.renderApiTableCard (cyclomatic 23) tsl/js/utils/MarkdownUtils.js:1119 — MarkdownUtils.renderApiTableCard has cyclomatic complexity 23 (threshold 15). Of this number, 19 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 · CodeRunner.parseScript (cyclomatic 23) · ×1
  • CodeRunner.parseScript (cyclomatic 23) REDACTED:23 — CodeRunner.parseScript 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 5 function items inside it that branch (a function literal at line 66, extractPattern, a function literal at line 74, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · WebGLMaterials.refreshUniformsPhysical (cyclomatic 23) · ×1
  • WebGLMaterials.refreshUniformsPhysical (cyclomatic 23) src/renderers/webgl/WebGLMaterials.js:413 — WebGLMaterials.refreshUniformsPhysical 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 · codemirror.nodeAndOffsetInLineMap (cyclomatic 22) · ×1
  • codemirror.nodeAndOffsetInLineMap (cyclomatic 22) editor/js/libs/codemirror/codemirror.js:2441 — codemirror.nodeAndOffsetInLineMap 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 · codemirror.defineOptions (cyclomatic 22) · ×1
  • codemirror.defineOptions (cyclomatic 22) editor/js/libs/codemirror/codemirror.js:7710 — codemirror.defineOptions has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 7776, option, a function literal at line 7741, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · codemirror.CodeMirror (cyclomatic 22) · ×1
  • codemirror.CodeMirror (cyclomatic 22) editor/js/libs/codemirror/codemirror.js:7885 — codemirror.CodeMirror has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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 · tern.doRequest (cyclomatic 22) · ×1
  • tern.doRequest (cyclomatic 22) editor/js/libs/ternjs/tern.js:173 — tern.doRequest has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 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 · AnimationAction._updateTime (cyclomatic 22) · ×1
  • AnimationAction._updateTime (cyclomatic 22) src/animation/AnimationAction.js:724 — AnimationAction._updateTime 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 · NodeUtils.getValueFromType (cyclomatic 22) · ×1
  • NodeUtils.getValueFromType (cyclomatic 22) src/nodes/core/NodeUtils.js:370 — NodeUtils.getValueFromType has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MathNode.generate (cyclomatic 22) · ×1
  • MathNode.generate (cyclomatic 22) src/nodes/math/MathNode.js:226 — MathNode.generate 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 · NodeBuilder.format (cyclomatic 22) · ×1
  • NodeBuilder.format (cyclomatic 22) src/nodes/core/NodeBuilder.js:3803 — NodeBuilder.format has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GLSLNodeBuilder.getVaryings (cyclomatic 22) · ×1
  • GLSLNodeBuilder.getVaryings (cyclomatic 22) src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:1242 — GLSLNodeBuilder.getVaryings 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 · WebGLTextureUtils._getBytesPerTexel (cyclomatic 22) · ×1
  • WebGLTextureUtils._getBytesPerTexel (cyclomatic 22) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:1374 — WebGLTextureUtils._getBytesPerTexel has cyclomatic complexity 22 (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 · WebGLClipping.WebGLClipping (cyclomatic 22) · ×1
  • WebGLClipping.WebGLClipping (cyclomatic 22) src/renderers/webgl/WebGLClipping.js:4 — WebGLClipping.WebGLClipping has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 59, projectPlanes, a function literal at line 22, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · WebGLEnvironments.WebGLEnvironments.getPMREM (cyclomatic 22) · ×1
  • WebGLEnvironments.WebGLEnvironments.getPMREM (cyclomatic 22) src/renderers/webgl/WebGLEnvironments.js:71 — WebGLEnvironments.WebGLEnvironments.getPMREM 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 · MarkdownUtils.splitTypeTokens (cyclomatic 22) · ×1
  • MarkdownUtils.splitTypeTokens (cyclomatic 22) tsl/js/utils/MarkdownUtils.js:691 — MarkdownUtils.splitTypeTokens has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CodeRunner.processExportDeclarations (cyclomatic 22) · ×1
  • CodeRunner.processExportDeclarations (cyclomatic 22) REDACTED:165 — CodeRunner.processExportDeclarations has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 205, extractPattern, a function literal at line 236, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · build.categorize (cyclomatic 22) · ×1
  • build.categorize (cyclomatic 22) utils/llms/build.js:566 — build.categorize has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · updateDebugWGSL (cyclomatic 22) · ×1
  • updateDebugWGSL (cyclomatic 22) tsl/js/managers/PlaygroundManager.js:1022 — updateDebugWGSL has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 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 · parseTypeInner (cyclomatic 22) · ×1
  • parseTypeInner (cyclomatic 22) editor/js/libs/ternjs/def.js:154 — parseTypeInner has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs 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 · codemirror.coordsCharInner (cyclomatic 21) · ×1
  • codemirror.coordsCharInner (cyclomatic 21) editor/js/libs/codemirror/codemirror.js:2755 — codemirror.coordsCharInner has cyclomatic complexity 21 (threshold 15). 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: 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 · codemirror.highlightWorker (cyclomatic 21) · ×1
  • codemirror.highlightWorker (cyclomatic 21) editor/js/libs/codemirror/codemirror.js:3993 — codemirror.highlightWorker has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4000, 4029). 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 · codemirror.ContentEditableInput.init (cyclomatic 21) · ×1
  • codemirror.ContentEditableInput.init (cyclomatic 21) editor/js/libs/codemirror/codemirror.js:8810 — codemirror.ContentEditableInput.init has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 7 function items inside it that branch (onCopyCut, a function literal at line 8826, belongsToInput, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Ray.intersectTriangle (cyclomatic 21) · ×1
  • Ray.intersectTriangle (cyclomatic 21) src/math/Ray.js:538 — Ray.intersectTriangle 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 · NodeMaterial.setupDiffuseColor (cyclomatic 21) · ×1
  • NodeMaterial.setupDiffuseColor (cyclomatic 21) src/materials/nodes/NodeMaterial.js:819 — NodeMaterial.setupDiffuseColor 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 · CodeCompiler.mergeImports (cyclomatic 21) · ×1
  • CodeCompiler.mergeImports (cyclomatic 21) tsl/js/code/CodeCompiler.js:1159 — CodeCompiler.mergeImports has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 1163). 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 · CodeCompiler.removeUnusedImports · ×1
  • CodeCompiler.removeUnusedImports::getFullLineRange (cyclomatic 21) tsl/js/code/CodeCompiler.js:1383 — CodeCompiler.removeUnusedImports::getFullLineRange 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 · codemirror.bidiSimplify (cyclomatic 20) · ×1
  • codemirror.bidiSimplify (cyclomatic 20) editor/js/libs/codemirror/codemirror.js:7615 — codemirror.bidiSimplify 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 · ShaderMaterial.toJSON (cyclomatic 20) · ×1
  • ShaderMaterial.toJSON (cyclomatic 20) src/materials/ShaderMaterial.js:311 — ShaderMaterial.toJSON 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 · ShaderCallNodeInternal.call (cyclomatic 20) · ×1
  • ShaderCallNodeInternal.call (cyclomatic 20) src/nodes/tsl/TSLCore.js:477 — ShaderCallNodeInternal.call has cyclomatic complexity 20 (threshold 15). Of this number, 19 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 · ConditionalNode.generate (cyclomatic 20) · ×1
  • ConditionalNode.generate (cyclomatic 20) src/nodes/math/ConditionalNode.js:140 — ConditionalNode.generate 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 · Morph.getEntry (cyclomatic 20) · ×1
  • Morph.getEntry (cyclomatic 20) src/nodes/accessors/Morph.js:93 — Morph.getEntry 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 · Textures.getSize (cyclomatic 20) · ×1
  • Textures.getSize (cyclomatic 20) src/renderers/common/Textures.js:538 — Textures.getSize 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 · WebGPUBackend.clear (cyclomatic 20) · ×1
  • WebGPUBackend.clear (cyclomatic 20) src/renderers/webgpu/WebGPUBackend.js:1737 — WebGPUBackend.clear 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. This is NOT this file's highest cyclomatic complexity: WebGPUBackend.needsRenderUpdate (cyclomatic 38) 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 · WebGLMaterials.WebGLMaterials.refreshMaterialUniforms (cyclomatic 20) · ×1
  • WebGLMaterials.WebGLMaterials.refreshMaterialUniforms (cyclomatic 20) src/renderers/webgl/WebGLMaterials.js:42 — WebGLMaterials.WebGLMaterials.refreshMaterialUniforms 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 · MarkdownUtils.formatApiParameters (cyclomatic 20) · ×1
  • MarkdownUtils.formatApiParameters (cyclomatic 20) tsl/js/utils/MarkdownUtils.js:873 — MarkdownUtils.formatApiParameters 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 · CodeEditor.updateTokenizerForCode (cyclomatic 20) · ×1
  • CodeEditor.updateTokenizerForCode (cyclomatic 20) tsl/js/editor/CodeEditor.js:24 — CodeEditor.updateTokenizerForCode has cyclomatic complexity 20 (threshold 15). Of this number, 13 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 · WebGLMaterials.refreshMaterialUniforms (cyclomatic 20) · ×1
  • WebGLMaterials.refreshMaterialUniforms (cyclomatic 20) src/renderers/webgl/WebGLMaterials.js:42 — WebGLMaterials.refreshMaterialUniforms 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 · codemirror.conflictingCollapsedRange (cyclomatic 19) · ×1
  • codemirror.conflictingCollapsedRange (cyclomatic 19) editor/js/libs/codemirror/codemirror.js:1535 — codemirror.conflictingCollapsedRange 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 · codemirror.calculateScrollPos (cyclomatic 19) · ×1
  • codemirror.calculateScrollPos (cyclomatic 19) editor/js/libs/codemirror/codemirror.js:3501 — codemirror.calculateScrollPos 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 · codemirror.onMouseDown (cyclomatic 19) · ×1
  • codemirror.onMouseDown (cyclomatic 19) editor/js/libs/codemirror/codemirror.js:7337 — codemirror.onMouseDown 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 · codemirror.domTextBetween (cyclomatic 19) · ×1
  • codemirror.domTextBetween (cyclomatic 19) editor/js/libs/codemirror/codemirror.js:9210 — codemirror.domTextBetween has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (walk, close, addText). 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 · def.passTwo (cyclomatic 19) · ×1
  • def.passTwo (cyclomatic 19) editor/js/libs/ternjs/def.js:378 — def.passTwo 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 · prettify.createSimpleLexer (cyclomatic 19) · ×1
  • prettify.createSimpleLexer (cyclomatic 19) REDACTED:662 — prettify.createSimpleLexer 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 2 function items inside it that branch (decorate, a function literal at line 665). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Material.setValues (cyclomatic 19) · ×1
  • Material.setValues (cyclomatic 19) src/materials/Material.js:557 — Material.setValues has cyclomatic complexity 19 (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 · CylinderGeometry.constructor (cyclomatic 19) · ×1
  • CylinderGeometry.constructor (cyclomatic 19) src/geometries/CylinderGeometry.js:34 — CylinderGeometry.constructor has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (generateTorso, generateCap). 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 · ShaderMaterial.fromJSON (cyclomatic 19) · ×1
  • ShaderMaterial.fromJSON (cyclomatic 19) src/materials/ShaderMaterial.js:413 — ShaderMaterial.fromJSON has cyclomatic complexity 19 (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 · Node._getChildren (cyclomatic 19) · ×1
  • Node._getChildren (cyclomatic 19) src/nodes/core/Node.js:634 — Node._getChildren 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 · MarkdownUtils.formatSignatureArgs (cyclomatic 19) · ×1
  • MarkdownUtils.formatSignatureArgs (cyclomatic 19) tsl/js/utils/MarkdownUtils.js:764 — MarkdownUtils.formatSignatureArgs 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 · makeupType (cyclomatic 19) · ×1
  • makeupType (cyclomatic 19) editor/js/libs/ternjs/infer.js:158 — makeupType 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 · codemirror.removeReadOnlyRanges (cyclomatic 18) · ×1
  • codemirror.removeReadOnlyRanges (cyclomatic 18) editor/js/libs/codemirror/codemirror.js:1445 — codemirror.removeReadOnlyRanges has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 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 · codemirror.endOperation_finish (cyclomatic 18) · ×1
  • codemirror.endOperation_finish (cyclomatic 18) editor/js/libs/codemirror/codemirror.js:3912 — codemirror.endOperation_finish 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 · codemirror.onKeyPress (cyclomatic 18) · ×1
  • codemirror.onKeyPress (cyclomatic 18) editor/js/libs/codemirror/codemirror.js:7288 — codemirror.onKeyPress has cyclomatic complexity 18 (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 · codemirror.TextareaInput.init (cyclomatic 18) · ×1
  • codemirror.TextareaInput.init (cyclomatic 18) editor/js/libs/codemirror/codemirror.js:9355 — codemirror.TextareaInput.init has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 7 function items inside it that branch (prepareCopyCut, a function literal at line 9367, a function literal at line 9401, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · tern.invalidDoc (cyclomatic 18) · ×1
  • tern.invalidDoc (cyclomatic 18) editor/js/libs/ternjs/tern.js:475 — tern.invalidDoc 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 · prettify.recombineTagsAndDecorations (cyclomatic 18) · ×1
  • prettify.recombineTagsAndDecorations (cyclomatic 18) REDACTED:1181 — prettify.recombineTagsAndDecorations has cyclomatic complexity 18 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · Ray.intersectBox (cyclomatic 18) · ×1
  • Ray.intersectBox (cyclomatic 18) src/math/Ray.js:449 — Ray.intersectBox 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 · ShaderCallNodeInternal.build (cyclomatic 18) · ×1
  • ShaderCallNodeInternal.build (cyclomatic 18) src/nodes/tsl/TSLCore.js:647 — ShaderCallNodeInternal.build 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 · UniformArrayNode.updateBuffer (cyclomatic 18) · ×1
  • UniformArrayNode.updateBuffer (cyclomatic 18) src/nodes/accessors/UniformArrayNode.js:213 — UniformArrayNode.updateBuffer has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · NodeMaterial.setup (cyclomatic 18) · ×1
  • NodeMaterial.setup (cyclomatic 18) src/materials/nodes/NodeMaterial.js:470 — NodeMaterial.setup 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 · NodeBuilder.getPromotedComponentType (cyclomatic 18) · ×1
  • NodeBuilder.getPromotedComponentType (cyclomatic 18) src/nodes/core/NodeBuilder.js:1996 — NodeBuilder.getPromotedComponentType 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 · XRManager.setSession (cyclomatic 18) · ×1
  • XRManager.setSession (cyclomatic 18) src/renderers/common/XRManager.js:1192 — XRManager.setSession 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 · Renderer._getFrameBufferTarget (cyclomatic 18) · ×1
  • Renderer._getFrameBufferTarget (cyclomatic 18) src/renderers/common/Renderer.js:1828 — Renderer._getFrameBufferTarget has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs 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 · Renderer._updateCamera (cyclomatic 18) · ×1
  • Renderer._updateCamera (cyclomatic 18) src/renderers/common/Renderer.js:3897 — Renderer._updateCamera 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 · WebGLAttributeUtils.createAttribute (cyclomatic 18) · ×1
  • WebGLAttributeUtils.createAttribute (cyclomatic 18) src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js:79 — WebGLAttributeUtils.createAttribute 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 · WebGPUPipelineUtils._getBlending (cyclomatic 18) · ×1
  • WebGPUPipelineUtils._getBlending (cyclomatic 18) src/renderers/webgpu/utils/WebGPUPipelineUtils.js:560 — WebGPUPipelineUtils._getBlending 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 · WebGLMaterials.WebGLMaterials.refreshUniformsCommon (cyclomatic 18) · ×1
  • WebGLMaterials.WebGLMaterials.refreshUniformsCommon (cyclomatic 18) src/renderers/webgl/WebGLMaterials.js:138 — WebGLMaterials.WebGLMaterials.refreshUniformsCommon 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 · server.createHandler (cyclomatic 18) · ×1
  • server.createHandler (cyclomatic 18) utils/server.js:45 — server.createHandler has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 47, 76, 85). 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 · MarkdownUtils.parseGuide (cyclomatic 18) · ×1
  • MarkdownUtils.parseGuide (cyclomatic 18) tsl/js/utils/MarkdownUtils.js:30 — MarkdownUtils.parseGuide 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. This shape REPEATS in the file: one other method here (MarkdownUtils.parseGuide::flatten) 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.
D1 · Cyclomatic Complexity · PlaygroundManager.loadPlaygroundFromHash (cyclomatic 18) · ×1
  • PlaygroundManager.loadPlaygroundFromHash (cyclomatic 18) tsl/js/managers/PlaygroundManager.js:171 — PlaygroundManager.loadPlaygroundFromHash 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 · WebGLMaterials.refreshUniformsCommon (cyclomatic 18) · ×1
  • WebGLMaterials.refreshUniformsCommon (cyclomatic 18) src/renderers/webgl/WebGLMaterials.js:138 — WebGLMaterials.refreshUniformsCommon 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 · RenderImageDialog.constructor (cyclomatic 17) · ×1
  • RenderImageDialog.constructor (cyclomatic 17) editor/js/Menubar.Render.js:76 — RenderImageDialog.constructor 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 3 function literals inside it that branch (lines 157, 163, 287). 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 · infer.maybeTagAsGeneric (cyclomatic 17) · ×1
  • infer.maybeTagAsGeneric (cyclomatic 17) editor/js/libs/ternjs/infer.js:872 — infer.maybeTagAsGeneric has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Texture.transformUv (cyclomatic 17) · ×1
  • Texture.transformUv (cyclomatic 17) src/textures/Texture.js:693 — Texture.transformUv 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 · Triangle.closestPointToPoint (cyclomatic 17) · ×1
  • Triangle.closestPointToPoint (cyclomatic 17) src/math/Triangle.js:442 — Triangle.closestPointToPoint has cyclomatic complexity 17 (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 · CatmullRomCurve3.getPoint (cyclomatic 17) · ×1
  • CatmullRomCurve3.getPoint (cyclomatic 17) src/extras/curves/CatmullRomCurve3.js:175 — CatmullRomCurve3.getPoint 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 · Interpolant.evaluate (cyclomatic 17) · ×1
  • Interpolant.evaluate (cyclomatic 17) src/math/Interpolant.js:92 — Interpolant.evaluate 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 · NodeMaterial.setupLighting (cyclomatic 17) · ×1
  • NodeMaterial.setupLighting (cyclomatic 17) src/materials/nodes/NodeMaterial.js:1102 — NodeMaterial.setupLighting has cyclomatic complexity 17 (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 · RenderObject.getDrawParameters (cyclomatic 17) · ×1
  • RenderObject.getDrawParameters (cyclomatic 17) src/renderers/common/RenderObject.js:662 — RenderObject.getDrawParameters 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 · RenderObject.getMaterialCacheKey (cyclomatic 17) · ×1
  • RenderObject.getMaterialCacheKey (cyclomatic 17) src/renderers/common/RenderObject.js:794 — RenderObject.getMaterialCacheKey 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 · NodeBuilder._getLayoutInputs (cyclomatic 17) · ×1
  • NodeBuilder._getLayoutInputs (cyclomatic 17) src/nodes/core/NodeBuilder.js:2829 — NodeBuilder._getLayoutInputs has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 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 · NodeBuilder.getNodeUniform (cyclomatic 17) · ×1
  • NodeBuilder.getNodeUniform (cyclomatic 17) src/nodes/core/NodeBuilder.js:3778 — NodeBuilder.getNodeUniform has cyclomatic complexity 17 (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 · WebGLTextureUtils.setTextureParameters (cyclomatic 17) · ×1
  • WebGLTextureUtils.setTextureParameters (cyclomatic 17) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:325 — WebGLTextureUtils.setTextureParameters 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 · WebGPUBindingUtils.createBindGroup (cyclomatic 17) · ×1
  • WebGPUBindingUtils.createBindGroup (cyclomatic 17) src/renderers/webgpu/utils/WebGPUBindingUtils.js:302 — WebGPUBindingUtils.createBindGroup 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 · MarkdownUtils.tokenizeCodeToElement (cyclomatic 17) · ×1
  • MarkdownUtils.tokenizeCodeToElement (cyclomatic 17) tsl/js/utils/MarkdownUtils.js:1388 — MarkdownUtils.tokenizeCodeToElement 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 · publish.buildSearchListForData (cyclomatic 17) · ×1
  • publish.buildSearchListForData (cyclomatic 17) utils/docs/template/publish.js:145 — publish.buildSearchListForData 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 one function literal inside it that branches (line 161). 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 · renderObject (cyclomatic 17) · ×1
  • renderObject (cyclomatic 17) devtools/panel/panel.js:392 — renderObject has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 9 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 · UIOutliner.setOptions (cyclomatic 16) · ×1
  • UIOutliner.setOptions (cyclomatic 16) editor/js/libs/ui.three.js:342 — UIOutliner.setOptions has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (onDrop, onDragOver, moveObject, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · codemirror.updateLineGutter (cyclomatic 16) · ×1
  • codemirror.updateLineGutter (cyclomatic 16) editor/js/libs/codemirror/codemirror.js:2177 — codemirror.updateLineGutter 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 · codemirror.patchDisplay (cyclomatic 16) · ×1
  • codemirror.patchDisplay (cyclomatic 16) editor/js/libs/codemirror/codemirror.js:4227 — codemirror.patchDisplay has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirror.addChangeToHistory (cyclomatic 16) · ×1
  • codemirror.addChangeToHistory (cyclomatic 16) editor/js/libs/codemirror/codemirror.js:4898 — codemirror.addChangeToHistory 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 · codemirror.makeChangeSingleDocInEditor (cyclomatic 16) · ×1
  • codemirror.makeChangeSingleDocInEditor (cyclomatic 16) editor/js/libs/codemirror/codemirror.js:5471 — codemirror.makeChangeSingleDocInEditor has cyclomatic complexity 16 (threshold 15). 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, separate the cases: extract each independent 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.setValues (cyclomatic 16) · ×1
  • Texture.setValues (cyclomatic 16) src/textures/Texture.js:550 — Texture.setValues has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RenderTarget._setTextureOptions (cyclomatic 16) · ×1
  • RenderTarget._setTextureOptions (cyclomatic 16) src/core/RenderTarget.js:284 — RenderTarget._setTextureOptions 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 · Color.setStyle (cyclomatic 16) · ×1
  • Color.setStyle (cyclomatic 16) src/math/Color.js:286 — Color.setStyle has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · BufferGeometry.toJSON (cyclomatic 16) · ×1
  • BufferGeometry.toJSON (cyclomatic 16) src/core/BufferGeometry.js:1222 — BufferGeometry.toJSON 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 · ImageLoader.load (cyclomatic 16) · ×1
  • ImageLoader.load (cyclomatic 16) src/loaders/ImageLoader.js:45 — ImageLoader.load has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (onImageLoad, onImageError, a function literal at line 61). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · CubeCamera.update (cyclomatic 16) · ×1
  • CubeCamera.update (cyclomatic 16) src/cameras/CubeCamera.js:178 — CubeCamera.update 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 · NodeUtils.getValueType (cyclomatic 16) · ×1
  • NodeUtils.getValueType (cyclomatic 16) src/nodes/core/NodeUtils.js:229 — NodeUtils.getValueType 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 · NodeBuilder.isDeterministic (cyclomatic 16) · ×1
  • NodeBuilder.isDeterministic (cyclomatic 16) src/nodes/core/NodeBuilder.js:2463 — NodeBuilder.isDeterministic 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 · NodeManager.updateBackground (cyclomatic 16) · ×1
  • NodeManager.updateBackground (cyclomatic 16) src/renderers/common/nodes/NodeManager.js:749 — NodeManager.updateBackground has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 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 · XRManager.foveateBoundTexture (cyclomatic 16) · ×1
  • XRManager.foveateBoundTexture (cyclomatic 16) src/renderers/common/XRManager.js:654 — XRManager.foveateBoundTexture 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 · WebGPUBackend.copyFramebufferToTexture (cyclomatic 16) · ×1
  • WebGPUBackend.copyFramebufferToTexture (cyclomatic 16) src/renderers/webgpu/WebGPUBackend.js:3119 — WebGPUBackend.copyFramebufferToTexture 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. This is NOT this file's highest cyclomatic complexity: WebGPUBackend.needsRenderUpdate (cyclomatic 38) 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 · DirectRenderPipeline.render (cyclomatic 16) · ×1
  • DirectRenderPipeline.render (cyclomatic 16) src/renderers/common/DirectRenderPipeline.js:77 — DirectRenderPipeline.render 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 · SearchManager.getRankedTree (cyclomatic 16) · ×1
  • SearchManager.getRankedTree (cyclomatic 16) REDACTED:214 — SearchManager.getRankedTree 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 2 function items inside it that branch (processNodes, a function literal at line 276). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PlaygroundManager.getImportedCustomScripts (cyclomatic 16) · ×1
  • PlaygroundManager.getImportedCustomScripts (cyclomatic 16) tsl/js/managers/PlaygroundManager.js:1128 — PlaygroundManager.getImportedCustomScripts 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 · generateMaterialXNodeInterfaceRegistry.parseNodeDefs (cyclomatic 16) · ×1
  • generateMaterialXNodeInterfaceRegistry.parseNodeDefs (cyclomatic 16) utils/generateMaterialXNodeInterfaceRegistry.js:71 — generateMaterialXNodeInterfaceRegistry.parseNodeDefs 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 · getDepthBuffer (cyclomatic 16) · ×1
  • getDepthBuffer (cyclomatic 16) src/renderers/webgpu/utils/WebGPUTextureUtils.js:573 — getDepthBuffer 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 · (anonymous) (cyclomatic 16) · ×1
  • (anonymous) (cyclomatic 16) editor/js/libs/ternjs/infer.js:1078 — (anonymous) 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 · parseFnType (cyclomatic 16) · ×1
  • parseFnType (cyclomatic 16) editor/js/libs/ternjs/def.js:81 — parseFnType 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 · parseEffect (cyclomatic 16) · ×1
  • parseEffect (cyclomatic 16) editor/js/libs/ternjs/def.js:244 — parseEffect has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 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 · flattenJSON (cyclomatic 16) · ×1
  • flattenJSON (cyclomatic 16) src/animation/AnimationUtils.js:99 — flattenJSON 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.
D2 · Cognitive Complexity · WebGLProgram (cognitive 358) · ×1
  • WebGLProgram (cognitive 358) src/renderers/webgl/WebGLProgram.js:371 — WebGLProgram has cognitive complexity 358 (threshold 15). Drivers by points: ternaries 162 (322 pts), if/else 17 (23 pts), boolean chains 13 (nesting depth added 166). Of this number, 340 points are the body's own statements and 18 belong to 5 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 · WebGLUtils.convert (cognitive 256) · ×1
  • WebGLUtils.convert (cognitive 256) src/renderers/webgl-fallback/utils/WebGLUtils.js:51 — WebGLUtils.convert has cognitive complexity 256 (threshold 15). Drivers by points: if/else 84 (180 pts), ternaries 18 (69 pts), boolean chains 7 (nesting depth added 147). 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 · WebGLUtils.WebGLUtils.convert (cognitive 256) · ×1
  • WebGLUtils.WebGLUtils.convert (cognitive 256) src/renderers/webgl/WebGLUtils.js:6 — WebGLUtils.WebGLUtils.convert has cognitive complexity 256 (threshold 15). Drivers by points: if/else 84 (180 pts), ternaries 18 (69 pts), boolean chains 7 (nesting depth added 147). 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.fromJSON (cognitive 166) · ×1
  • Material.fromJSON (cognitive 166) src/materials/Material.js:920 — Material.fromJSON has cognitive complexity 166 (threshold 15). Drivers by points: if/else 131 (133 pts), boolean chains 33 (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 · getInternalFormat (cognitive 156) · ×1
  • getInternalFormat (cognitive 156) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:165 — getInternalFormat has cognitive complexity 156 (threshold 15). Drivers by points: if/else 75 (137 pts), ternaries 4 (10 pts), boolean chains 9 (nesting depth added 68). To reduce it, split the body into named stages: move each independent 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 · run (cognitive 151) · ×1
  • run (cognitive 151) REDACTED:897 — run has cognitive complexity 151 (threshold 15). Drivers by points: if/else 38 (107 pts), boolean chains 14, ternaries 4 (12 pts), loops 8 (11 pts), error handling 3 (7 pts) (nesting depth added 84). Of this number, 130 points are the body's own statements and 21 belong to 6 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 · insertLineContent (cognitive 147) · ×1
  • insertLineContent (cognitive 147) editor/js/libs/codemirror/codemirror.js:1921 — insertLineContent has cognitive complexity 147 (threshold 15). Drivers by points: if/else 23 (84 pts), ternaries 5 (25 pts), loops 7 (22 pts), boolean chains 16 (nesting depth added 96). 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 · parseObject (cognitive 139) · ×1
  • parseObject (cognitive 139) src/loaders/ObjectLoader.js:784 — parseObject has cognitive complexity 139 (threshold 15). Drivers by points: if/else 74 (128 pts), loops 4 (8 pts), boolean chains 2, match/switch 1 (nesting depth added 58). Of this number, 125 points are the body's own statements and 14 belong to 4 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 · getFormat (cognitive 138) · ×1
  • getFormat (cognitive 138) src/renderers/webgpu/utils/WebGPUTextureUtils.js:1481 — getFormat has cognitive complexity 138 (threshold 15). Drivers by points: ternaries 28 (92 pts), match/switch 11 (31 pts), if/else 7 (13 pts), boolean chains 2 (nesting depth added 90). To reduce it, split the body into named stages: move each independent 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 · _setFramebuffer (cognitive 133) · ×1
  • _setFramebuffer (cognitive 133) src/renderers/webgl-fallback/WebGLBackend.js:2299 — _setFramebuffer has cognitive complexity 133 (threshold 15). Drivers by points: if/else 39 (93 pts), ternaries 5 (20 pts), boolean chains 12, loops 2 (8 pts) (nesting depth added 75). 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 · load (cognitive 132) · ×1
  • load (cognitive 132) REDACTED:584 — load has cognitive complexity 132 (threshold 15). Drivers by points: if/else 31 (89 pts), error handling 7 (20 pts), loops 4 (13 pts), boolean chains 10 (nesting depth added 80). Of this number, 19 points are the body's own statements and 113 belong to 4 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 · Loader (cognitive 127) · ×1
  • Loader (cognitive 127) editor/js/Loader.js:14 — Loader has cognitive complexity 127 (threshold 15). Drivers by points: if/else 37 (75 pts), loops 13 (29 pts), error handling 6 (14 pts), boolean chains 5, match/switch 3 (4 pts) (nesting depth added 63). None of this is in the body itself: all 127 points belong to 48 function items inside it that branch (a function literal at line 691, handleZIP, loadFiles::createFileFinder, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 124) · ×1
  • (anonymous) (cognitive 124) editor/js/libs/codemirror/codemirror.js:370 — (anonymous) has cognitive complexity 124 (threshold 15). Drivers by points: if/else 29 (49 pts), loops 16 (34 pts), boolean chains 21, ternaries 8 (20 pts) (nesting depth added 50). None of this is in the body itself: all 124 points belong to 3 function items inside it that branch (a function literal at line 393, charType, BidiSpan). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · equals (cognitive 123) · ×1
  • equals (cognitive 123) src/materials/nodes/manager/NodeMaterialObserver.js:597 — equals has cognitive complexity 123 (threshold 15). Drivers by points: if/else 41 (78 pts), ternaries 8 (21 pts), boolean chains 14, loops 5 (10 pts) (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 · Material.toJSON (cognitive 119) · ×1
  • Material.toJSON (cognitive 119) src/materials/Material.js:610 — Material.toJSON has cognitive complexity 119 (threshold 15). Drivers by points: if/else 81 (84 pts), boolean chains 34, loops 1 (nesting depth added 3). Of this number, 118 points are the body's own statements and 1 belongs to one function item 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 · Viewport.Viewport (cognitive 113) · ×1
  • Viewport.Viewport (cognitive 113) editor/js/Viewport.js:25 — Viewport.Viewport has cognitive complexity 113 (threshold 15). Drivers by points: if/else 58 (80 pts), boolean chains 12, ternaries 5 (9 pts), match/switch 6, loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 28). None of this is in the body itself: all 113 points belong to 32 function items inside it that branch (a function literal at line 105, a function literal at line 493, a function literal at line 348, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · setup (cognitive 110) · ×1
  • setup (cognitive 110) src/nodes/accessors/MaterialNode.js:120 — setup has cognitive complexity 110 (threshold 15). Drivers by points: if/else 68 (91 pts), boolean chains 15, ternaries 2 (4 pts) (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 · skipAtomicInner (cognitive 105) · ×1
  • skipAtomicInner (cognitive 105) editor/js/libs/codemirror/codemirror.js:5204 — skipAtomicInner has cognitive complexity 105 (threshold 15). Drivers by points: ternaries 12 (55 pts), if/else 11 (42 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 75). 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 · Guide.renderPage (cognitive 104) · ×1
  • Guide.renderPage (cognitive 104) REDACTED:1231 — Guide.renderPage has cognitive complexity 104 (threshold 15). Drivers by points: if/else 45 (67 pts), boolean chains 25, ternaries 7 (10 pts), loops 1 (2 pts) (nesting depth added 26). Of this number, 65 points are the body's own statements and 39 belong to 19 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 · _initMonaco (cognitive 103) · ×1
  • _initMonaco (cognitive 103) tsl/js/editor/CodeEditor.js:253 — _initMonaco has cognitive complexity 103 (threshold 15). Drivers by points: if/else 38 (82 pts), boolean chains 14, loops 1 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 48). None of this is in the body itself: all 103 points belong to 23 function items inside it that branch (a function literal at line 255, (anonymous)::_touchMoveListener, (anonymous)::provideCompletionItems::getAdditionalTextEdits, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · WebGLBindingStates.WebGLBindingStates.setupVertexAttributes (cognitive 99) · ×1
  • WebGLBindingStates.WebGLBindingStates.setupVertexAttributes (cognitive 99) src/renderers/webgl/WebGLBindingStates.js:315 — WebGLBindingStates.WebGLBindingStates.setupVertexAttributes has cognitive complexity 99 (threshold 15). Drivers by points: if/else 16 (54 pts), loops 7 (35 pts), boolean chains 5, match/switch 1 (5 pts) (nesting depth added 70). 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 · WebGLBindingStates.setupVertexAttributes (cognitive 99) · ×1
  • WebGLBindingStates.setupVertexAttributes (cognitive 99) src/renderers/webgl/WebGLBindingStates.js:315 — WebGLBindingStates.setupVertexAttributes has cognitive complexity 99 (threshold 15). Drivers by points: if/else 16 (54 pts), loops 7 (35 pts), boolean chains 5, match/switch 1 (5 pts) (nesting depth added 70). 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 · ObjectLoader.parseTextures (cognitive 97) · ×1
  • ObjectLoader.parseTextures (cognitive 97) src/loaders/ObjectLoader.js:674 — ObjectLoader.parseTextures has cognitive complexity 97 (threshold 15). Drivers by points: if/else 33 (94 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 62). Of this number, 96 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebGLPrograms.getParameters (cognitive 94) · ×1
  • WebGLPrograms.getParameters (cognitive 94) src/renderers/webgl/WebGLPrograms.js:54 — WebGLPrograms.getParameters has cognitive complexity 94 (threshold 15). Drivers by points: boolean chains 75, if/else 9 (11 pts), ternaries 8 (nesting depth added 2). 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 · $prettyPrint · ×1
  • $prettyPrint::doWork (cognitive 92) REDACTED:1532 — $prettyPrint::doWork has cognitive complexity 92 (threshold 15). Drivers by points: if/else 15 (48 pts), ternaries 6 (25 pts), boolean chains 13, loops 3 (6 pts) (nesting depth added 55). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · WebGLPrograms.WebGLPrograms.getParameters (cognitive 91) · ×1
  • WebGLPrograms.WebGLPrograms.getParameters (cognitive 91) src/renderers/webgl/WebGLPrograms.js:54 — WebGLPrograms.WebGLPrograms.getParameters has cognitive complexity 91 (threshold 15). Drivers by points: boolean chains 70, if/else 9 (11 pts), ternaries 8 (10 pts) (nesting depth added 4). 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 · finishRender (cognitive 83) · ×1
  • finishRender (cognitive 83) src/renderers/webgpu/WebGPUBackend.js:1414 — finishRender has cognitive complexity 83 (threshold 15). Drivers by points: if/else 15 (37 pts), ternaries 6 (30 pts), loops 5 (14 pts), boolean chains 2 (nesting depth added 55). To reduce it, split the body into named stages: move each independent 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 · updateTexture (cognitive 83) · ×1
  • updateTexture (cognitive 83) src/renderers/common/Textures.js:276 — updateTexture has cognitive complexity 83 (threshold 15). Drivers by points: if/else 28 (60 pts), boolean chains 13, loops 2 (9 pts), ternaries 1 (nesting depth added 39). Of this number, 72 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WebGPUBindingUtils._createLayoutEntries (cognitive 82) · ×1
  • WebGPUBindingUtils._createLayoutEntries (cognitive 82) src/renderers/webgpu/utils/WebGPUBindingUtils.js:420 — WebGPUBindingUtils._createLayoutEntries has cognitive complexity 82 (threshold 15). Drivers by points: if/else 34 (72 pts), boolean chains 9, loops 1 (nesting depth added 38). 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 · getUniforms (cognitive 82) · ×1
  • getUniforms (cognitive 82) src/renderers/webgpu/nodes/WGSLNodeBuilder.js:2204 — getUniforms has cognitive complexity 82 (threshold 15). Drivers by points: if/else 19 (41 pts), ternaries 6 (22 pts), boolean chains 12, loops 3 (7 pts) (nesting depth added 42). 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 · drawSelectionRange (cognitive 81) · ×1
  • drawSelectionRange (cognitive 81) editor/js/libs/codemirror/codemirror.js:3204 — drawSelectionRange has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 23 (47 pts), if/else 16 (22 pts), boolean chains 12 (nesting depth added 30). Most of this is not in the body itself: 14 of the 81 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 3234, drawForLine::wrapX, add, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Sidebar.Scene.SidebarScene (cognitive 80) · ×1
  • Sidebar.Scene.SidebarScene (cognitive 80) editor/js/Sidebar.Scene.js:6 — Sidebar.Scene.SidebarScene has cognitive complexity 80 (threshold 15). Drivers by points: if/else 39 (51 pts), ternaries 13 (16 pts), loops 5 (7 pts), boolean chains 5, match/switch 1 (nesting depth added 17). None of this is in the body itself: all 80 points belong to 17 function items inside it that branch (refreshUI, a function literal at line 596, refreshBackgroundUI, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · toJSON (cognitive 80) · ×1
  • toJSON (cognitive 80) src/core/Object3D.js:1294 — toJSON has cognitive complexity 80 (threshold 15). Drivers by points: if/else 37 (58 pts), loops 5 (12 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 30). Of this number, 74 points are the body's own statements and 6 belong to 4 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 · WebGLTextureUtils.updateTexture (cognitive 79) · ×1
  • WebGLTextureUtils.updateTexture (cognitive 79) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:530 — WebGLTextureUtils.updateTexture has cognitive complexity 79 (threshold 15). Drivers by points: if/else 30 (51 pts), loops 8 (24 pts), boolean chains 4 (nesting depth added 37). To reduce it, split the body into named stages: move each independent 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._projectObject (cognitive 77) · ×1
  • Renderer._projectObject (cognitive 77) src/renderers/common/Renderer.js:3532 — Renderer._projectObject has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (56 pts), loops 3 (9 pts), boolean chains 6, ternaries 2 (6 pts) (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 · WebGLBackend._resolveRenderTarget (cognitive 77) · ×1
  • WebGLBackend._resolveRenderTarget (cognitive 77) src/renderers/webgl-fallback/WebGLBackend.js:2705 — WebGLBackend._resolveRenderTarget has cognitive complexity 77 (threshold 15). Drivers by points: if/else 15 (45 pts), loops 4 (16 pts), boolean chains 8, ternaries 2 (8 pts) (nesting depth added 48). 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 · WebGLRenderer.constructor · ×1
  • WebGLRenderer.constructor::projectObject (cognitive 77) src/renderers/WebGLRenderer.js:1873 — WebGLRenderer.constructor::projectObject has cognitive complexity 77 (threshold 15). Drivers by points: if/else 21 (61 pts), loops 2 (6 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 48). 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. This shape REPEATS in the file: one other method here (WebGLRenderer.constructor) 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 · Guide.init (cognitive 75) · ×1
  • Guide.init (cognitive 75) REDACTED:245 — Guide.init has cognitive complexity 75 (threshold 15). Drivers by points: if/else 26 (41 pts), boolean chains 28, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 18). Of this number, 24 points are the body's own statements and 51 belong to 24 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 · draw (cognitive 75) · ×1
  • draw (cognitive 75) src/renderers/webgl-fallback/WebGLBackend.js:1129 — draw has cognitive complexity 75 (threshold 15). Drivers by points: if/else 25 (49 pts), loops 5 (14 pts), boolean chains 10, ternaries 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _getRenderPassDescriptor (cognitive 74) · ×1
  • _getRenderPassDescriptor (cognitive 74) src/renderers/webgpu/WebGPUBackend.js:670 — _getRenderPassDescriptor has cognitive complexity 74 (threshold 15). Drivers by points: if/else 15 (31 pts), ternaries 5 (25 pts), loops 4 (10 pts), boolean chains 8 (nesting depth added 42). 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 · MarkdownUtils.parse (cognitive 72) · ×1
  • MarkdownUtils.parse (cognitive 72) tsl/js/utils/MarkdownUtils.js:283 — MarkdownUtils.parse has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (32 pts), ternaries 8 (22 pts), loops 13 (14 pts), boolean chains 4 (nesting depth added 28). Of this number, 57 points are the body's own statements and 15 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 · packLDrawModel.parseObject (cognitive 72) · ×1
  • packLDrawModel.parseObject (cognitive 72) utils/packLDrawModel.mjs:93 — packLDrawModel.parseObject has cognitive complexity 72 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 6 (15 pts), error handling 4 (14 pts), boolean chains 6, ternaries 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent 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 · generate (cognitive 72) · ×1
  • generate (cognitive 72) src/nodes/math/OperatorNode.js:195 — generate has cognitive complexity 72 (threshold 15). Drivers by points: if/else 38 (61 pts), boolean chains 8, ternaries 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · draw (cognitive 68) · ×1
  • draw (cognitive 68) src/renderers/webgpu/WebGPUBackend.js:2235 — draw has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (50 pts), boolean chains 9, loops 2 (5 pts), ternaries 2 (4 pts) (nesting depth added 38). 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 · build (cognitive 67) · ×1
  • build (cognitive 67) src/nodes/core/Node.js:1122 — build has cognitive complexity 67 (threshold 15). Drivers by points: if/else 20 (42 pts), boolean chains 16, loops 2 (5 pts), ternaries 2 (4 pts) (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 · WebXRController.update (cognitive 66) · ×1
  • WebXRController.update (cognitive 66) src/renderers/webxr/WebXRController.js:224 — WebXRController.update has cognitive complexity 66 (threshold 15). Drivers by points: if/else 23 (57 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 36). 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 · copyTextureToTexture (cognitive 65) · ×1
  • copyTextureToTexture (cognitive 65) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:857 — copyTextureToTexture has cognitive complexity 65 (threshold 15). Drivers by points: if/else 29 (45 pts), boolean chains 7, ternaries 3 (5 pts), loops 2 (4 pts), other 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebGPUBackend.beginRender (cognitive 64) · ×1
  • WebGPUBackend.beginRender (cognitive 64) src/renderers/webgpu/WebGPUBackend.js:882 — WebGPUBackend.beginRender has cognitive complexity 64 (threshold 15). Drivers by points: if/else 33 (50 pts), boolean chains 8, ternaries 1 (4 pts), loops 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 · stretchSpansOverChange (cognitive 64) · ×1
  • stretchSpansOverChange (cognitive 64) editor/js/libs/codemirror/codemirror.js:1372 — stretchSpansOverChange has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 4 (9 pts), boolean chains 8, ternaries 2 (6 pts) (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 · clear (cognitive 63) · ×1
  • clear (cognitive 63) src/renderers/webgl-fallback/WebGLBackend.js:792 — clear has cognitive complexity 63 (threshold 15). Drivers by points: if/else 25 (50 pts), ternaries 1 (5 pts), boolean chains 4, loops 1 (4 pts) (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 · LoopNode.generate (cognitive 62) · ×1
  • LoopNode.generate (cognitive 62) src/nodes/utils/LoopNode.js:155 — LoopNode.generate has cognitive complexity 62 (threshold 15). Drivers by points: if/else 21 (45 pts), boolean chains 8, match/switch 1 (4 pts), ternaries 1 (3 pts), loops 2 (nesting depth added 29). Of this number, 59 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generate (cognitive 62) · ×1
  • generate (cognitive 62) src/nodes/accessors/TextureNode.js:658 — generate has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 11 (35 pts), if/else 12 (23 pts), boolean chains 4 (nesting depth added 35). 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 · renderApiTableCard (cognitive 61) · ×1
  • renderApiTableCard (cognitive 61) tsl/js/utils/MarkdownUtils.js:1119 — renderApiTableCard has cognitive complexity 61 (threshold 15). Drivers by points: if/else 12 (34 pts), ternaries 6 (20 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 38). Of this number, 50 points are the body's own statements and 11 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 · findCompletions (cognitive 59) · ×1
  • findCompletions (cognitive 59) editor/js/libs/ternjs/tern.js:594 — findCompletions has cognitive complexity 59 (threshold 15). Drivers by points: if/else 36 (55 pts), boolean chains 25, loops 6 (11 pts), ternaries 4 (8 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent 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 · createRenderPipeline (cognitive 59) · ×1
  • createRenderPipeline (cognitive 59) src/renderers/webgpu/utils/WebGPUPipelineUtils.js:71 — createRenderPipeline has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 11, ternaries 2 (6 pts), error handling 2 (5 pts), loops 2 (3 pts) (nesting depth added 23). Of this number, 43 points are the body's own statements and 16 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 · WebGLRenderer.constructor (cognitive 58) · ×1
  • WebGLRenderer.constructor (cognitive 58) src/renderers/WebGLRenderer.js:71 — WebGLRenderer.constructor has cognitive complexity 58 (threshold 15). Drivers by points: if/else 139 (213 pts), boolean chains 110, ternaries 10 (16 pts), loops 6 (12 pts), error handling 1 (nesting depth added 86). To reduce it, split the body into named stages: move each independent 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 (WebGLRenderer.constructor::projectObject) 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 · PropertyBinding.bind (cognitive 57) · ×1
  • PropertyBinding.bind (cognitive 57) REDACTED:487 — PropertyBinding.bind has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (51 pts), loops 1 (3 pts), match/switch 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 · buildToken (cognitive 57) · ×1
  • buildToken (cognitive 57) editor/js/libs/codemirror/codemirror.js:1801 — buildToken has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (37 pts), ternaries 3 (8 pts), boolean chains 7, loops 2 (5 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent 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 · getUniforms (cognitive 57) · ×1
  • getUniforms (cognitive 57) src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:935 — getUniforms has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (39 pts), loops 3 (7 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 29). 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 · codemirror.leftButtonSelect (cognitive 56) · ×1
  • codemirror.leftButtonSelect (cognitive 56) editor/js/libs/codemirror/codemirror.js:7477 — codemirror.leftButtonSelect has cognitive complexity 56 (threshold 15). Drivers by points: if/else 32 (45 pts), ternaries 2 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 17). Of this number, 19 points are the body's own statements and 37 belong to 6 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 · build-defs.buildDefs (cognitive 55) · ×1
  • build-defs.buildDefs (cognitive 55) editor/js/libs/tern-threejs/build-defs.js:107 — build-defs.buildDefs has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (40 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent 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 · Bindings._update (cognitive 54) · ×1
  • Bindings._update (cognitive 54) src/renderers/common/Bindings.js:450 — Bindings._update has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (43 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent 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 · _updateTime (cognitive 54) · ×1
  • _updateTime (cognitive 54) src/animation/AnimationAction.js:724 — _updateTime has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (39 pts), ternaries 4 (12 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderSingleApiCard (cognitive 53) · ×1
  • renderSingleApiCard (cognitive 53) tsl/js/utils/MarkdownUtils.js:999 — renderSingleApiCard has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (28 pts), ternaries 7 (19 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 28). Of this number, 44 points are the body's own statements and 9 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 · WebGPUTextureUtils._getBlockData (cognitive 52) · ×1
  • WebGPUTextureUtils._getBlockData (cognitive 52) src/renderers/webgpu/utils/WebGPUTextureUtils.js:1212 — WebGPUTextureUtils._getBlockData has cognitive complexity 52 (threshold 15). Drivers by points: if/else 28, boolean chains 24. 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 · CodeCompiler.compile · ×1
  • CodeCompiler.compile::parseFile::processNode (cognitive 52) tsl/js/code/CodeCompiler.js:760 — CodeCompiler.compile::parseFile::processNode has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (37 pts), ternaries 4 (14 pts), boolean chains 1 (nesting depth added 26). 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 · comment.commentsBefore (cognitive 51) · ×1
  • comment.commentsBefore (cognitive 51) editor/js/libs/ternjs/comment.js:22 — comment.commentsBefore has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (36 pts), boolean chains 8, loops 3 (7 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent 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 · WebGLLights.WebGLLights.setup (cognitive 51) · ×1
  • WebGLLights.WebGLLights.setup (cognitive 51) src/renderers/webgl/WebGLLights.js:221 — WebGLLights.WebGLLights.setup has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (39 pts), loops 4 (9 pts), boolean chains 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 · WebGLLights.setup (cognitive 51) · ×1
  • WebGLLights.setup (cognitive 51) src/renderers/webgl/WebGLLights.js:221 — WebGLLights.setup has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (39 pts), loops 4 (9 pts), boolean chains 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 · Script.Script (cognitive 50) · ×1
  • Script.Script (cognitive 50) editor/js/Script.js:8 — Script.Script has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (26 pts), loops 6 (10 pts), error handling 3 (5 pts), match/switch 3 (5 pts), boolean chains 3, ternaries 1 (nesting depth added 15). None of this is in the body itself: all 50 points belong to 12 function items inside it that branch (a function literal at line 151, a function literal at line 425, setTitle, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · WebGPUAttributeUtils.createAttribute (cognitive 50) · ×1
  • WebGPUAttributeUtils.createAttribute (cognitive 50) src/renderers/webgpu/utils/WebGPUAttributeUtils.js:104 — WebGPUAttributeUtils.createAttribute has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 9, loops 2 (8 pts), ternaries 1 (4 pts) (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 · WebGLPrograms.WebGLPrograms.getProgramCacheKeyBooleans (cognitive 50) · ×1
  • WebGLPrograms.WebGLPrograms.getProgramCacheKeyBooleans (cognitive 50) src/renderers/webgl/WebGLPrograms.js:508 — WebGLPrograms.WebGLPrograms.getProgramCacheKeyBooleans has cognitive complexity 50 (threshold 15). Drivers by points: if/else 50. 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 · _draw (cognitive 50) · ×1
  • _draw (cognitive 50) src/renderers/webgpu/WebGPUBackend.js:2042 — _draw has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (27 pts), loops 5 (10 pts), ternaries 3 (9 pts), boolean chains 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _updateDrawParameters (cognitive 50) · ×1
  • _updateDrawParameters (cognitive 50) src/objects/BatchedMesh.js:1543 — _updateDrawParameters has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (33 pts), ternaries 4 (7 pts), loops 3 (6 pts), boolean chains 4 (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 · WebGLPrograms.getProgramCacheKeyBooleans (cognitive 50) · ×1
  • WebGLPrograms.getProgramCacheKeyBooleans (cognitive 50) src/renderers/webgl/WebGLPrograms.js:508 — WebGLPrograms.getProgramCacheKeyBooleans has cognitive complexity 50 (threshold 15). Drivers by points: if/else 50. 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 · codemirror.findPosH (cognitive 49) · ×1
  • codemirror.findPosH (cognitive 49) editor/js/libs/codemirror/codemirror.js:8710 — codemirror.findPosH has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (35 pts), ternaries 5 (16 pts), boolean chains 15, loops 1 (2 pts) (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 · BufferGeometryLoader.parse (cognitive 49) · ×1
  • BufferGeometryLoader.parse (cognitive 49) src/loaders/BufferGeometryLoader.js:90 — BufferGeometryLoader.parse has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (36 pts), loops 4 (8 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 22). Of this number, 46 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebGPUTextureUtils.updateTexture (cognitive 49) · ×1
  • WebGPUTextureUtils.updateTexture (cognitive 49) src/renderers/webgpu/utils/WebGPUTextureUtils.js:643 — WebGPUTextureUtils.updateTexture has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (29 pts), loops 5 (15 pts), boolean chains 5 (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 · measureCharInner (cognitive 49) · ×1
  • measureCharInner (cognitive 49) editor/js/libs/codemirror/codemirror.js:2489 — measureCharInner has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 10, loops 4 (9 pts), ternaries 4 (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 · setSession (cognitive 49) · ×1
  • setSession (cognitive 49) src/renderers/common/XRManager.js:1192 — setSession has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 8 (29 pts), if/else 8 (15 pts), loops 1 (4 pts), boolean chains 1 (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 · onAnimationFrame (cognitive 49) · ×1
  • onAnimationFrame (cognitive 49) src/renderers/common/XRManager.js:1772 — onAnimationFrame has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (32 pts), ternaries 3 (10 pts), boolean chains 4, loops 2 (3 pts) (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 · ShapePath.toShapes (cognitive 48) · ×1
  • ShapePath.toShapes (cognitive 48) src/extras/core/ShapePath.js:146 — ShapePath.toShapes has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 9 (11 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 16). Of this number, 39 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LayoutManager.setupResizer (cognitive 48) · ×1
  • LayoutManager.setupResizer (cognitive 48) tsl/js/managers/LayoutManager.js:116 — LayoutManager.setupResizer has cognitive complexity 48 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 12, ternaries 2 (4 pts) (nesting depth added 8). Of this number, 18 points are the body's own statements and 30 belong to 6 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 · parsePath (cognitive 48) · ×1
  • parsePath (cognitive 48) editor/js/libs/ternjs/def.js:290 — parsePath has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 11, ternaries 2 (4 pts), loops 2 (3 pts) (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 · codemirror.markText (cognitive 47) · ×1
  • codemirror.markText (cognitive 47) editor/js/libs/codemirror/codemirror.js:5970 — codemirror.markText has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (31 pts), boolean chains 11, loops 1 (3 pts), ternaries 2 (nesting depth added 10). Of this number, 38 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · moveVisually (cognitive 47) · ×1
  • moveVisually (cognitive 47) editor/js/libs/codemirror/codemirror.js:6914 — moveVisually has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 11 (20 pts), if/else 12 (16 pts), boolean chains 10, loops 1 (nesting depth added 13). Of this number, 31 points are the body's own statements and 16 belong to 4 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 · Mesh._computeIntersections (cognitive 46) · ×1
  • Mesh._computeIntersections (cognitive 46) src/objects/Mesh.js:292 — Mesh._computeIntersections has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 6 (20 pts) (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 · WebGPUTextureUtils._getTypedArrayType (cognitive 46) · ×1
  • WebGPUTextureUtils._getTypedArrayType (cognitive 46) src/renderers/webgpu/utils/WebGPUTextureUtils.js:1392 — WebGPUTextureUtils._getTypedArrayType has cognitive complexity 46 (threshold 15). Drivers by points: if/else 44, boolean chains 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 · CodeCompiler.renameIdentifier · ×1
  • CodeCompiler.renameIdentifier::walk (cognitive 46) tsl/js/code/CodeCompiler.js:71 — CodeCompiler.renameIdentifier::walk has cognitive complexity 46 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 8, loops 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 · def.passTwo (cognitive 45) · ×1
  • def.passTwo (cognitive 45) editor/js/libs/ternjs/def.js:378 — def.passTwo has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (33 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setupShadow (cognitive 45) · ×1
  • setupShadow (cognitive 45) src/nodes/lighting/ShadowNode.js:355 — setupShadow has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 9, ternaries 1 (nesting depth added 11). Of this number, 39 points are the body's own statements and 6 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 · codemirror.onScrollWheel (cognitive 44) · ×1
  • codemirror.onScrollWheel (cognitive 44) editor/js/libs/codemirror/codemirror.js:4511 — codemirror.onScrollWheel has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 13, loops 2 (5 pts) (nesting depth added 14). Of this number, 35 points are the body's own statements and 9 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 · FileLoader.load (cognitive 44) · ×1
  • FileLoader.load (cognitive 44) src/loaders/FileLoader.js:78 — FileLoader.load has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (27 pts), ternaries 4 (7 pts), loops 3 (5 pts), boolean chains 4, match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 6 of the 44 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 144, 227, 183, …). 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 · GLSLNodeBuilder.getVaryings (cognitive 44) · ×1
  • GLSLNodeBuilder.getVaryings (cognitive 44) src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:1242 — GLSLNodeBuilder.getVaryings has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 2 (10 pts), boolean chains 7, loops 3 (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 · publish.publish (cognitive 44) · ×1
  • publish.publish (cognitive 44) utils/docs/template/publish.js:655 — publish.publish has cognitive complexity 44 (threshold 15). Drivers by points: if/else 25 (34 pts), boolean chains 7, loops 1 (2 pts), ternaries 1 (nesting depth added 10). Of this number, 16 points are the body's own statements and 28 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 · SearchManager.scrollToSearchMatch (cognitive 43) · ×1
  • SearchManager.scrollToSearchMatch (cognitive 43) REDACTED:345 — SearchManager.scrollToSearchMatch has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 5 (12 pts), boolean chains 7 (nesting depth added 20). Of this number, 41 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 · Sidebar.Material.MapProperty.SidebarMaterialMapProperty (cognitive 42) · ×1
  • Sidebar.Material.MapProperty.SidebarMaterialMapProperty (cognitive 42) editor/js/Sidebar.Material.MapProperty.js:11 — Sidebar.Material.MapProperty.SidebarMaterialMapProperty has cognitive complexity 42 (threshold 15). Drivers by points: if/else 25 (36 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 11). Most of this is not in the body itself: 6 of the 42 points are its own statements and the rest belongs to 9 function items inside it that branch (update, onChange, onMapChange, …). 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 · renderObject (cognitive 42) · ×1
  • renderObject (cognitive 42) src/renderers/common/Renderer.js:4017 — renderObject has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 5 (14 pts), boolean chains 7 (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 · WebGLMorphtargets.WebGLMorphtargets.update (cognitive 41) · ×1
  • WebGLMorphtargets.WebGLMorphtargets.update (cognitive 41) src/renderers/webgl/WebGLMorphtargets.js:11 — WebGLMorphtargets.WebGLMorphtargets.update has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (7 pts), boolean chains 6, ternaries 2 (3 pts) (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 · getUniformFromNode (cognitive 41) · ×1
  • getUniformFromNode (cognitive 41) src/renderers/webgpu/nodes/WGSLNodeBuilder.js:1377 — getUniformFromNode has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 7, ternaries 2 (6 pts) (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 · Sidebar.Project.Resources.SidebarProjectResources (cognitive 40) · ×1
  • Sidebar.Project.Resources.SidebarProjectResources (cognitive 40) editor/js/Sidebar.Project.Resources.js:6 — Sidebar.Project.Resources.SidebarProjectResources has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (31 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 12). None of this is in the body itself: all 40 points belong to 5 function items inside it that branch (getTextureType, refreshTexturesUI, a function literal at line 207, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · make-geo-picking-texture.main (cognitive 40) · ×1
  • make-geo-picking-texture.main (cognitive 40) manual/resources/tools/geo-picking/make-geo-picking-texture.js:7 — make-geo-picking-texture.main has cognitive complexity 40 (threshold 15). Drivers by points: loops 12 (19 pts), if/else 7 (15 pts), boolean chains 6 (nesting depth added 15). Of this number, 23 points are the body's own statements and 17 belong to 3 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · MeshPhysicalNodeMaterial.setupVariants (cognitive 40) · ×1
  • MeshPhysicalNodeMaterial.setupVariants (cognitive 40) src/materials/nodes/MeshPhysicalNodeMaterial.js:427 — MeshPhysicalNodeMaterial.setupVariants has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 15 (31 pts), if/else 8 (9 pts) (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 · Renderer.compileAsync (cognitive 40) · ×1
  • Renderer.compileAsync (cognitive 40) src/renderers/common/Renderer.js:984 — Renderer.compileAsync has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 6, loops 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 7). Of this number, 35 points are the body's own statements and 5 belong to 3 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, 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 · WebGPUBindingUtils.createBindGroup (cognitive 40) · ×1
  • WebGPUBindingUtils.createBindGroup (cognitive 40) src/renderers/webgpu/utils/WebGPUBindingUtils.js:302 — WebGPUBindingUtils.createBindGroup has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 3 (13 pts), boolean chains 1, loops 1 (nesting depth added 23). 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 · (anonymous) (cognitive 40) · ×1
  • (anonymous) (cognitive 40) editor/js/libs/codemirror/codemirror.js:14 — (anonymous) has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 20, if/else 11 (12 pts), loops 4, ternaries 4 (nesting depth added 1). 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 · serializeArg (cognitive 40) · ×1
  • serializeArg (cognitive 40) REDACTED:288 — serializeArg has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (27 pts), ternaries 4 (7 pts), boolean chains 6 (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 · updateTokenizerForCode (cognitive 40) · ×1
  • updateTokenizerForCode (cognitive 40) tsl/js/editor/CodeEditor.js:24 — updateTokenizerForCode has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 22). Of this number, 22 points are the body's own statements and 18 belong to 6 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 · Renderer._renderScene (cognitive 39) · ×1
  • Renderer._renderScene (cognitive 39) src/renderers/common/Renderer.js:1931 — Renderer._renderScene has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 9, ternaries 4 (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 · WebGLEnvironments.WebGLEnvironments.getPMREM (cognitive 39) · ×1
  • WebGLEnvironments.WebGLEnvironments.getPMREM (cognitive 39) src/renderers/webgl/WebGLEnvironments.js:71 — WebGLEnvironments.WebGLEnvironments.getPMREM has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (28 pts), boolean chains 8, ternaries 1 (3 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 · clear (cognitive 39) · ×1
  • clear (cognitive 39) editor/js/libs/codemirror/codemirror.js:5860 — clear has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 9, loops 2 (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 · createTexture (cognitive 39) · ×1
  • createTexture (cognitive 39) src/renderers/webgpu/utils/WebGPUTextureUtils.js:302 — createTexture has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 13, loops 1 (3 pts), error handling 1 (nesting depth added 6). 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 · call (cognitive 39) · ×1
  • call (cognitive 39) src/nodes/tsl/TSLCore.js:477 — call has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 4 (7 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 17). Of this number, 35 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getMaterialCacheKey (cognitive 39) · ×1
  • getMaterialCacheKey (cognitive 39) src/renderers/common/RenderObject.js:794 — getMaterialCacheKey has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (31 pts), ternaries 2 (7 pts), loops 1 (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 · findHoleBridge (cognitive 39) · ×1
  • findHoleBridge (cognitive 39) src/extras/lib/earcut.js:314 — findHoleBridge has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 3 (10 pts), boolean chains 8, loops 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · updateRenderTarget (cognitive 39) · ×1
  • updateRenderTarget (cognitive 39) src/renderers/common/Textures.js:131 — updateRenderTarget has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 11, ternaries 6 (11 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 · MenubarFile (cognitive 39) · ×1
  • MenubarFile (cognitive 39) editor/js/Menubar.File.js:4 — MenubarFile has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (24 pts), loops 8 (11 pts), boolean chains 3, error handling 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 34 function items inside it that branch (a function literal at line 513, a function literal at line 541, a function literal at line 275, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Sidebar.Settings.Shortcuts.SidebarSettingsShortcuts (cognitive 38) · ×1
  • Sidebar.Settings.Shortcuts.SidebarSettingsShortcuts (cognitive 38) editor/js/Sidebar.Settings.Shortcuts.js:6 — Sidebar.Settings.Shortcuts.SidebarSettingsShortcuts has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (30 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 1 of the 38 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 99, a function literal at line 37, a function literal at line 58, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PolyhedronGeometry.constructor (cognitive 38) · ×1
  • PolyhedronGeometry.constructor (cognitive 38) src/geometries/PolyhedronGeometry.js:23 — PolyhedronGeometry.constructor has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 9 (11 pts), boolean chains 4 (nesting depth added 13). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to 7 function items inside it that branch (subdivideFace, correctSeam, correctUV, …). 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 · nodeAndOffsetInLineMap (cognitive 38) · ×1
  • nodeAndOffsetInLineMap (cognitive 38) editor/js/libs/codemirror/codemirror.js:2441 — nodeAndOffsetInLineMap has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (9 pts), boolean chains 7, ternaries 1 (4 pts) (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 · clear (cognitive 38) · ×1
  • clear (cognitive 38) src/renderers/webgpu/WebGPUBackend.js:1737 — clear has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 6 (16 pts), boolean chains 3 (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 · Sidebar.Material.SidebarMaterial · ×1
  • Sidebar.Material.SidebarMaterial::update (cognitive 37) editor/js/Sidebar.Material.js:454 — Sidebar.Material.SidebarMaterial::update has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 1 (4 pts), boolean chains 2, error handling 1 (2 pts) (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 · prettify.createSimpleLexer · ×1
  • prettify.createSimpleLexer::decorate (cognitive 37) REDACTED:701 — prettify.createSimpleLexer::decorate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 20). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · WireframeGeometry.constructor (cognitive 37) · ×1
  • WireframeGeometry.constructor (cognitive 37) src/geometries/WireframeGeometry.js:32 — WireframeGeometry.constructor has cognitive complexity 37 (threshold 15). Drivers by points: loops 5 (19 pts), if/else 6 (18 pts) (nesting depth added 26). 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 · MathNode.generate (cognitive 37) · ×1
  • MathNode.generate (cognitive 37) src/nodes/math/MathNode.js:226 — MathNode.generate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (22 pts), ternaries 3 (9 pts), boolean chains 6 (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 · NodeMaterial.setup (cognitive 37) · ×1
  • NodeMaterial.setup (cognitive 37) src/materials/nodes/NodeMaterial.js:470 — NodeMaterial.setup has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 2 (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 · Renderer._getShadowNodes (cognitive 37) · ×1
  • Renderer._getShadowNodes (cognitive 37) src/renderers/common/Renderer.js:3788 — Renderer._getShadowNodes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 12 (nesting depth added 14). 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 · applyTextInput (cognitive 37) · ×1
  • applyTextInput (cognitive 37) editor/js/libs/codemirror/codemirror.js:8148 — applyTextInput has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 9, ternaries 3 (6 pts), loops 2 (5 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 · importProjectJSON · ×1
  • importProjectJSON::(anonymous)::onload (cognitive 37) tsl/js/managers/ProjectsManager.js:483 — importProjectJSON::(anonymous)::onload has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 11, loops 2 (4 pts), ternaries 1 (2 pts), error handling 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 · processCommit (cognitive 37) · ×1
  • processCommit (cognitive 37) utils/changelog.js:402 — processCommit has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 5, ternaries 2 (5 pts) (nesting depth added 13). Of this number, 36 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 · Interpolant.evaluate (cognitive 36) · ×1
  • Interpolant.evaluate (cognitive 36) src/math/Interpolant.js:92 — Interpolant.evaluate has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 3 (5 pts) (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 · CodeRunner.processExportDeclarations (cognitive 36) · ×1
  • CodeRunner.processExportDeclarations (cognitive 36) REDACTED:165 — CodeRunner.processExportDeclarations has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 2 (6 pts), boolean chains 5, error handling 1 (nesting depth added 13). Most of this is not in the body itself: 1 of the 36 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 205, extractPattern, a function literal at line 236, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · registerEventHandlers (cognitive 36) · ×1
  • registerEventHandlers (cognitive 36) editor/js/libs/codemirror/codemirror.js:7962 — registerEventHandlers has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 11, ternaries 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 3 of the 36 points are its own statements and the rest belongs to 22 function items inside it that branch (a function literal at line 8020, a function literal at line 8004, a function literal at line 7967, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · _updateCamera (cognitive 36) · ×1
  • _updateCamera (cognitive 36) src/renderers/common/Renderer.js:3897 — _updateCamera has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (12 pts), boolean chains 4 (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 · canonicalType (cognitive 36) · ×1
  • canonicalType (cognitive 36) editor/js/libs/ternjs/infer.js:263 — canonicalType has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 2 (6 pts), loops 3 (5 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 · findCompletions · ×1
  • findCompletions::gather (cognitive 36) editor/js/libs/ternjs/tern.js:609 — findCompletions::gather has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 13, ternaries 3 (6 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.
D2 · Cognitive Complexity · WGSLNodeBuilder.buildCode (cognitive 35) · ×1
  • WGSLNodeBuilder.buildCode (cognitive 35) src/renderers/webgpu/nodes/WGSLNodeBuilder.js:2387 — WGSLNodeBuilder.buildCode has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (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 · WebGLMaterials.WebGLMaterials.refreshUniformsPhysical (cognitive 35) · ×1
  • WebGLMaterials.WebGLMaterials.refreshUniformsPhysical (cognitive 35) src/renderers/webgl/WebGLMaterials.js:413 — WebGLMaterials.WebGLMaterials.refreshUniformsPhysical has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22 (35 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 · PlaygroundManager.getImportedCustomScripts (cognitive 35) · ×1
  • PlaygroundManager.getImportedCustomScripts (cognitive 35) tsl/js/managers/PlaygroundManager.js:1128 — PlaygroundManager.getImportedCustomScripts has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (8 pts), ternaries 2 (7 pts), boolean chains 3 (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 · makeChangeFromHistory (cognitive 35) · ×1
  • makeChangeFromHistory (cognitive 35) editor/js/libs/codemirror/codemirror.js:5343 — makeChangeFromHistory has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 10, ternaries 4 (6 pts), loops 3 (nesting depth added 7). Of this number, 28 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · onDrop (cognitive 35) · ×1
  • onDrop (cognitive 35) editor/js/libs/codemirror/codemirror.js:6534 — onDrop has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 6, loops 2 (6 pts), error handling 1 (2 pts) (nesting depth added 14). Of this number, 28 points are the body's own statements and 7 belong to 7 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 · setBlending (cognitive 35) · ×1
  • setBlending (cognitive 35) src/renderers/webgl-fallback/utils/WebGLState.js:468 — setBlending has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 10, match/switch 2 (8 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 · resolveFile (cognitive 35) · ×1
  • resolveFile (cognitive 35) editor/js/libs/ternjs/tern.js:366 — resolveFile has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 8, loops 2 (5 pts), ternaries 3 (nesting depth added 10). Most of this is not in the body itself: 6 of the 35 points are its own statements and the rest belongs to one function literal inside it that branches (line 384). 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 · WebGLMaterials.refreshUniformsPhysical (cognitive 35) · ×1
  • WebGLMaterials.refreshUniformsPhysical (cognitive 35) src/renderers/webgl/WebGLMaterials.js:413 — WebGLMaterials.refreshUniformsPhysical has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22 (35 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 · codemirror.regChange (cognitive 34) · ×1
  • codemirror.regChange (cognitive 34) editor/js/libs/codemirror/codemirror.js:3004 — codemirror.regChange has cognitive complexity 34 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 6 (nesting depth added 6). 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 · codemirror.indentLine (cognitive 34) · ×1
  • codemirror.indentLine (cognitive 34) editor/js/libs/codemirror/codemirror.js:8080 — codemirror.indentLine has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (27 pts), loops 2 (4 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 · codemirror.addEditorMethods (cognitive 34) · ×1
  • codemirror.addEditorMethods (cognitive 34) editor/js/libs/codemirror/codemirror.js:8270 — codemirror.addEditorMethods has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 34. 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 · ConditionalNode.generate (cognitive 34) · ×1
  • ConditionalNode.generate (cognitive 34) src/nodes/math/ConditionalNode.js:140 — ConditionalNode.generate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 3, ternaries 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 · Morph.getEntry (cognitive 34) · ×1
  • Morph.getEntry (cognitive 34) src/nodes/accessors/Morph.js:93 — Morph.getEntry has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 5, loops 2 (5 pts), ternaries 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 · SearchManager.calculateScore (cognitive 34) · ×1
  • SearchManager.calculateScore (cognitive 34) REDACTED:76 — SearchManager.calculateScore has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConsoleManager._initConsoleOverrides (cognitive 34) · ×1
  • ConsoleManager._initConsoleOverrides (cognitive 34) tsl/js/managers/ConsoleManager.js:16 — ConsoleManager._initConsoleOverrides has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 19, if/else 11 (12 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 21, 56, 41, …). 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 · buildLineContent (cognitive 34) · ×1
  • buildLineContent (cognitive 34) editor/js/libs/codemirror/codemirror.js:1734 — buildLineContent has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 9, ternaries 3 (5 pts), 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 · coordsCharInner (cognitive 34) · ×1
  • coordsCharInner (cognitive 34) editor/js/libs/codemirror/codemirror.js:2755 — coordsCharInner has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 12 (24 pts), if/else 6 (7 pts), boolean chains 3 (nesting depth added 13). Of this number, 31 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 · endOfLine (cognitive 34) · ×1
  • endOfLine (cognitive 34) editor/js/libs/codemirror/codemirror.js:6886 — endOfLine has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (20 pts), if/else 6 (13 pts), boolean chains 1 (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 · _resolveLayoutDefaults (cognitive 34) · ×1
  • _resolveLayoutDefaults (cognitive 34) src/nodes/core/NodeBuilder.js:2891 — _resolveLayoutDefaults has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 5 (8 pts), boolean chains 2, ternaries 1 (nesting depth added 11). Of this number, 19 points are the body's own statements and 15 belong to 4 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 · _getChildren (cognitive 34) · ×1
  • _getChildren (cognitive 34) src/nodes/core/Node.js:634 — _getChildren has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 7, loops 3 (7 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 · KeyframeTrack.optimize (cognitive 33) · ×1
  • KeyframeTrack.optimize (cognitive 33) src/animation/KeyframeTrack.js:492 — KeyframeTrack.optimize has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (11 pts), boolean chains 3 (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 · GLSLNodeBuilder.buildCode (cognitive 33) · ×1
  • GLSLNodeBuilder.buildCode (cognitive 33) src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:1780 — GLSLNodeBuilder.buildCode has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 2 (3 pts), boolean chains 2, ternaries 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 · WebGLState.WebGLState.setBlending (cognitive 33) · ×1
  • WebGLState.WebGLState.setBlending (cognitive 33) src/renderers/webgl/WebGLState.js:609 — WebGLState.WebGLState.setBlending has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, match/switch 2 (8 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 · pollContent (cognitive 33) · ×1
  • pollContent (cognitive 33) editor/js/libs/codemirror/codemirror.js:9060 — pollContent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 10, loops 4 (5 pts), ternaries 3 (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 · WebGLState.setBlending (cognitive 33) · ×1
  • WebGLState.setBlending (cognitive 33) src/renderers/webgl/WebGLState.js:609 — WebGLState.setBlending has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, match/switch 2 (8 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 · BufferGeometry.computeBoundingSphere (cognitive 32) · ×1
  • BufferGeometry.computeBoundingSphere (cognitive 32) src/core/BufferGeometry.js:718 — BufferGeometry.computeBoundingSphere has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (12 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 · server.createHandler (cognitive 32) · ×1
  • server.createHandler (cognitive 32) utils/server.js:45 — server.createHandler has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 4 (11 pts), boolean chains 4 (nesting depth added 13). None of this is in the body itself: all 32 points belong to 3 function literals inside it that branch (lines 47, 76, 85). 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 · publish.buildSearchListForData (cognitive 32) · ×1
  • publish.buildSearchListForData (cognitive 32) utils/docs/template/publish.js:145 — publish.buildSearchListForData has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 5 (nesting depth added 16). None of this is in the body itself: all 32 points belong to one function literal inside it that branches (line 161). 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 · updateUI (cognitive 32) · ×1
  • updateUI (cognitive 32) REDACTED:1949 — updateUI has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 10, ternaries 4, loops 1 (2 pts) (nesting depth added 7). Of this number, 21 points are the body's own statements and 11 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 · similarType (cognitive 32) · ×1
  • similarType (cognitive 32) editor/js/libs/ternjs/infer.js:216 — similarType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 7, loops 2 (4 pts), 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 · parseFnType (cognitive 32) · ×1
  • parseFnType (cognitive 32) editor/js/libs/ternjs/def.js:81 — parseFnType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 2, 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 · EdgesGeometry.constructor (cognitive 31) · ×1
  • EdgesGeometry.constructor (cognitive 31) src/geometries/EdgesGeometry.js:35 — EdgesGeometry.constructor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (7 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ObjectLoader.parseImages (cognitive 31) · ×1
  • ObjectLoader.parseImages (cognitive 31) src/loaders/ObjectLoader.js:456 — ObjectLoader.parseImages has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 17). Of this number, 24 points are the body's own statements and 7 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. This shape REPEATS in the file: one other method here (ObjectLoader.parseImagesAsync) 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 · ObjectLoader.parseImagesAsync (cognitive 31) · ×1
  • ObjectLoader.parseImagesAsync (cognitive 31) src/loaders/ObjectLoader.js:576 — ObjectLoader.parseImagesAsync has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 17). Of this number, 24 points are the body's own statements and 7 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. This shape REPEATS in the file: one other method here (ObjectLoader.parseImages) 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 · OperatorNode.generateNodeType (cognitive 31) · ×1
  • OperatorNode.generateNodeType (cognitive 31) src/nodes/math/OperatorNode.js:109 — OperatorNode.generateNodeType has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 4 (7 pts), boolean chains 5 (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 · Info._getTextureMemorySize (cognitive 31) · ×1
  • Info._getTextureMemorySize (cognitive 31) src/renderers/common/Info.js:449 — Info._getTextureMemorySize has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 13, loops 1 (2 pts), ternaries 1 (nesting depth added 3). 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 · NodeManager.getForRender (cognitive 31) · ×1
  • NodeManager.getForRender (cognitive 31) src/renderers/common/nodes/NodeManager.js:220 — NodeManager.getForRender has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (24 pts), error handling 2 (7 pts) (nesting depth added 19). Most of this is not in the body itself: 15 of the 31 points are its own statements and the rest belongs to 2 function items inside it that branch (buildNodeBuilder, a function literal at line 276). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · CodeRunner.parseScript (cognitive 31) · ×1
  • CodeRunner.parseScript (cognitive 31) REDACTED:23 — CodeRunner.parseScript has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 66, extractPattern, a function literal at line 74, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · onContextMenu (cognitive 31) · ×1
  • onContextMenu (cognitive 31) editor/js/libs/codemirror/codemirror.js:9610 — onContextMenu has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 7, ternaries 3 (5 pts) (nesting depth added 4). Most of this is not in the body itself: 13 of the 31 points are its own statements and the rest belongs to 4 function items inside it that branch (rehide, prepareSelectAllHack, rehide::poll, …). 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 · Server (cognitive 31) · ×1
  • Server (cognitive 31) editor/js/libs/ternjs/tern.js:84 — Server has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (6 pts), boolean chains 5 (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 · openProjectsModal (cognitive 31) · ×1
  • openProjectsModal (cognitive 31) tsl/js/managers/ProjectsManager.js:585 — openProjectsModal has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13, ternaries 10 (11 pts), boolean chains 6, error handling 1 (nesting depth added 1). None of this is in the body itself: all 31 points belong to 22 function items inside it that branch (renderTopSection, a function literal at line 740, onchange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · distanceSqToSegment (cognitive 31) · ×1
  • distanceSqToSegment (cognitive 31) src/math/Ray.js:180 — distanceSqToSegment has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 3 (10 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 · EditorControls.constructor (cognitive 30) · ×1
  • EditorControls.constructor (cognitive 30) editor/js/EditorControls.js:5 — EditorControls.constructor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (22 pts), loops 3, match/switch 3, ternaries 2 (nesting depth added 3). None of this is in the body itself: all 30 points belong to 17 function items inside it that branch (onPointerDown, onPointerMove, onMouseDown, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · codemirror.updateHeightsInViewport (cognitive 30) · ×1
  • codemirror.updateHeightsInViewport (cognitive 30) editor/js/libs/codemirror/codemirror.js:3360 — codemirror.updateHeightsInViewport has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (5 pts), boolean chains 3 (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 · PlaygroundManager.togglePlayground (cognitive 30) · ×1
  • PlaygroundManager.togglePlayground (cognitive 30) tsl/js/managers/PlaygroundManager.js:18 — PlaygroundManager.togglePlayground has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (27 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 · build (cognitive 30) · ×1
  • build (cognitive 30) src/nodes/tsl/TSLCore.js:647 — build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (9 pts), boolean chains 5, ternaries 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 · parseTypeInner (cognitive 30) · ×1
  • parseTypeInner (cognitive 30) editor/js/libs/ternjs/def.js:154 — parseTypeInner has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 7 (nesting depth added 7). Of this number, 29 points are the body's own statements and 1 belongs 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 · NodeBuilder.generateConst (cognitive 29) · ×1
  • NodeBuilder.generateConst (cognitive 29) src/nodes/core/NodeBuilder.js:1555 — NodeBuilder.generateConst has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 7, ternaries 2 (4 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.
D2 · Cognitive Complexity · WebGLUniformsGroups.WebGLUniformsGroups.prepareUniformsGroup (cognitive 29) · ×1
  • WebGLUniformsGroups.WebGLUniformsGroups.prepareUniformsGroup (cognitive 29) src/renderers/webgl/WebGLUniformsGroups.js:254 — WebGLUniformsGroups.WebGLUniformsGroups.prepareUniformsGroup has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 3 (9 pts), loops 3 (6 pts), boolean chains 2 (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 · conflictingCollapsedRange (cognitive 29) · ×1
  • conflictingCollapsedRange (cognitive 29) editor/js/libs/codemirror/codemirror.js:1535 — conflictingCollapsedRange has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 9, ternaries 2 (8 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 · parseApiSignature (cognitive 29) · ×1
  • parseApiSignature (cognitive 29) tsl/js/utils/MarkdownUtils.js:945 — parseApiSignature has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 6 (10 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · setup (cognitive 29) · ×1
  • setup (cognitive 29) src/nodes/accessors/TextureNode.js:451 — setup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 10, ternaries 1 (3 pts) (nesting depth added 6). Of this number, 24 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 · RenderImageDialog.constructor (cognitive 28) · ×1
  • RenderImageDialog.constructor (cognitive 28) editor/js/Menubar.Render.js:76 — RenderImageDialog.constructor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 1 (3 pts), ternaries 1 (3 pts), match/switch 1 (nesting depth added 12). None of this is in the body itself: all 28 points belong to 3 function literals inside it that branch (lines 157, 163, 287). 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 · tern.doRequest (cognitive 28) · ×1
  • tern.doRequest (cognitive 28) editor/js/libs/ternjs/tern.js:173 — tern.doRequest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, ternaries 3 (5 pts), error handling 1, loops 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 9 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 · CylinderGeometry.constructor (cognitive 28) · ×1
  • CylinderGeometry.constructor (cognitive 28) src/geometries/CylinderGeometry.js:34 — CylinderGeometry.constructor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 7 (9 pts), ternaries 3, boolean chains 2 (nesting depth added 9). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 2 function items inside it that branch (generateTorso, generateCap). 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 · AnimationUtils.makeClipAdditive (cognitive 28) · ×1
  • AnimationUtils.makeClipAdditive (cognitive 28) src/animation/AnimationUtils.js:263 — AnimationUtils.makeClipAdditive has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 12). Of this number, 27 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 · WebGPUPipelineUtils._getBlending (cognitive 28) · ×1
  • WebGPUPipelineUtils._getBlending (cognitive 28) src/renderers/webgpu/utils/WebGPUPipelineUtils.js:560 — WebGPUPipelineUtils._getBlending has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 6 (7 pts), match/switch 2 (6 pts), boolean chains 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 · WebGLBindingStates.WebGLBindingStates.needsUpdate (cognitive 28) · ×1
  • WebGLBindingStates.WebGLBindingStates.needsUpdate (cognitive 28) src/renderers/webgl/WebGLBindingStates.js:149 — WebGLBindingStates.WebGLBindingStates.needsUpdate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 3, 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 · MarkdownUtils.parseGuide · ×1
  • MarkdownUtils.parseGuide::flatten (cognitive 28) tsl/js/utils/MarkdownUtils.js:131 — MarkdownUtils.parseGuide::flatten has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 9, 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. This shape REPEATS in the file: one other method here (MarkdownUtils.parseGuide) 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 · MarkdownUtils.parseGuide (cognitive 28) · ×1
  • MarkdownUtils.parseGuide (cognitive 28) tsl/js/utils/MarkdownUtils.js:30 — MarkdownUtils.parseGuide has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 16, loops 6 (9 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. This shape REPEATS in the file: one other method here (MarkdownUtils.parseGuide::flatten) 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 · MarkdownUtils.formatApiParameters (cognitive 28) · ×1
  • MarkdownUtils.formatApiParameters (cognitive 28) tsl/js/utils/MarkdownUtils.js:873 — MarkdownUtils.formatApiParameters has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 8, 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 · CodeCompiler.mergeImports (cognitive 28) · ×1
  • CodeCompiler.mergeImports (cognitive 28) tsl/js/code/CodeCompiler.js:1159 — CodeCompiler.mergeImports has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 2, loops 1 (nesting depth added 8). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 1163). 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 · PlaygroundManager.showImportedFiles (cognitive 28) · ×1
  • PlaygroundManager.showImportedFiles (cognitive 28) tsl/js/managers/PlaygroundManager.js:1182 — PlaygroundManager.showImportedFiles has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), error handling 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 14). 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 · (anonymous) (cognitive 28) · ×1
  • (anonymous) (cognitive 28) editor/js/libs/ternjs/infer.js:1078 — (anonymous) has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 1 (5 pts), boolean chains 4 (nesting depth added 12). Of this number, 18 points are the body's own statements and 10 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 · sortLinked (cognitive 28) · ×1
  • sortLinked (cognitive 28) src/extras/lib/earcut.js:393 — sortLinked has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 5 (10 pts), boolean chains 4 (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 · updateAttribute (cognitive 28) · ×1
  • updateAttribute (cognitive 28) src/renderers/webgpu/utils/WebGPUAttributeUtils.js:235 — updateAttribute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 2 (6 pts), loops 2 (4 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 · intersectTriangle (cognitive 28) · ×1
  • intersectTriangle (cognitive 28) src/math/Ray.js:538 — intersectTriangle has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 5, ternaries 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 · Animation · ×1
  • Animation::update (cognitive 28) editor/js/Animation.js:300 — Animation::update has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (8 pts), boolean chains 2, ternaries 1 (2 pts) (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 · WebGLBindingStates.needsUpdate (cognitive 28) · ×1
  • WebGLBindingStates.needsUpdate (cognitive 28) src/renderers/webgl/WebGLBindingStates.js:149 — WebGLBindingStates.needsUpdate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 3, 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 · flattenJSON (cognitive 28) · ×1
  • flattenJSON (cognitive 28) src/animation/AnimationUtils.js:99 — flattenJSON has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 7 (13 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 · codemirror.removeReadOnlyRanges (cognitive 27) · ×1
  • codemirror.removeReadOnlyRanges (cognitive 27) editor/js/libs/codemirror/codemirror.js:1445 — codemirror.removeReadOnlyRanges has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 8, loops 3 (5 pts) (nesting depth added 10). Of this number, 18 points are the body's own statements and 9 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 · tern.invalidDoc (cognitive 27) · ×1
  • tern.invalidDoc (cognitive 27) editor/js/libs/ternjs/tern.js:475 — tern.invalidDoc has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prettify.recombineTagsAndDecorations (cognitive 27) · ×1
  • prettify.recombineTagsAndDecorations (cognitive 27) REDACTED:1181 — prettify.recombineTagsAndDecorations has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 9). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · AnimationObjectGroup.uncache (cognitive 27) · ×1
  • AnimationObjectGroup.uncache (cognitive 27) src/animation/AnimationObjectGroup.js:249 — AnimationObjectGroup.uncache has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (9 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 · WebGLTextureUtils.setupRenderBufferStorage (cognitive 27) · ×1
  • WebGLTextureUtils.setupRenderBufferStorage (cognitive 27) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:1195 — WebGLTextureUtils.setupRenderBufferStorage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · markedSpansAfter (cognitive 27) · ×1
  • markedSpansAfter (cognitive 27) editor/js/libs/codemirror/codemirror.js:1352 — markedSpansAfter has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (15 pts), boolean chains 6, if/else 2 (4 pts), loops 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 · init (cognitive 27) · ×1
  • init (cognitive 27) editor/js/libs/codemirror/codemirror.js:8810 — init has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 3, loops 1 (nesting depth added 6). None of this is in the body itself: all 27 points belong to 11 function items inside it that branch (onCopyCut, belongsToInput, a function literal at line 8826, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · showPrimarySelection (cognitive 27) · ×1
  • showPrimarySelection (cognitive 27) editor/js/libs/codemirror/codemirror.js:8919 — showPrimarySelection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 10, ternaries 1 (2 pts), error handling 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 · copyFramebufferToTexture (cognitive 27) · ×1
  • copyFramebufferToTexture (cognitive 27) src/renderers/webgpu/WebGPUBackend.js:3119 — copyFramebufferToTexture has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · expandByObject (cognitive 27) · ×1
  • expandByObject (cognitive 27) src/math/Box3.js:303 — expandByObject has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 14). 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 · parseEffect (cognitive 27) · ×1
  • parseEffect (cognitive 27) editor/js/libs/ternjs/def.js:244 — parseEffect has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (9 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). Of this number, 18 points are the body's own statements and 9 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 · codemirror.copyHistoryArray (cognitive 26) · ×1
  • codemirror.copyHistoryArray (cognitive 26) editor/js/libs/codemirror/codemirror.js:5042 — codemirror.copyHistoryArray has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 3 (7 pts), ternaries 1 (3 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 · Bindings._destroyBindings (cognitive 26) · ×1
  • Bindings._destroyBindings (cognitive 26) src/renderers/common/Bindings.js:372 — Bindings._destroyBindings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (4 pts) (nesting depth added 17). 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 · GLSLNodeFunction.parse (cognitive 26) · ×1
  • GLSLNodeFunction.parse (cognitive 26) src/nodes/parsers/GLSLNodeFunction.js:9 — GLSLNodeFunction.parse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (7 pts), loops 2 (4 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 · NodeManager.updateBackground (cognitive 26) · ×1
  • NodeManager.updateBackground (cognitive 26) src/renderers/common/nodes/NodeManager.js:749 — NodeManager.updateBackground has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 6 (nesting depth added 10). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 760). 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 · runMode (cognitive 26) · ×1
  • runMode (cognitive 26) editor/js/libs/codemirror/codemirror.js:1211 — runMode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts), ternaries 1 (4 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 · highlightWorker (cognitive 26) · ×1
  • highlightWorker (cognitive 26) editor/js/libs/codemirror/codemirror.js:3993 — highlightWorker has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 8). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4000, 4029). 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 · makeupType (cognitive 26) · ×1
  • makeupType (cognitive 26) editor/js/libs/ternjs/infer.js:158 — makeupType has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (7 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 · setupDiffuseColor (cognitive 26) · ×1
  • setupDiffuseColor (cognitive 26) src/materials/nodes/NodeMaterial.js:819 — setupDiffuseColor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 6 (10 pts), boolean chains 4 (nesting depth added 5). 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 · codemirror.alignHorizontally (cognitive 25) · ×1
  • codemirror.alignHorizontally (cognitive 25) editor/js/libs/codemirror/codemirror.js:4283 — codemirror.alignHorizontally has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (5 pts), boolean chains 2 (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 · codemirror.locateNodeInLineView (cognitive 25) · ×1
  • codemirror.locateNodeInLineView (cognitive 25) editor/js/libs/codemirror/codemirror.js:9282 — codemirror.locateNodeInLineView has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 5 (12 pts), loops 5 (6 pts), boolean chains 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 · tern.findRefsToVariable (cognitive 25) · ×1
  • tern.findRefsToVariable (cognitive 25) editor/js/libs/ternjs/tern.js:886 — tern.findRefsToVariable has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 12). Of this number, 19 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 · Line.raycast (cognitive 25) · ×1
  • Line.raycast (cognitive 25) src/objects/Line.js:192 — Line.raycast has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (4 pts), ternaries 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 · UniformArrayNode.updateBuffer (cognitive 25) · ×1
  • UniformArrayNode.updateBuffer (cognitive 25) src/nodes/accessors/UniformArrayNode.js:213 — UniformArrayNode.updateBuffer has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 6, boolean chains 4 (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 · WebGPUBackend._updateArrayCameraLayerDescriptors (cognitive 25) · ×1
  • WebGPUBackend._updateArrayCameraLayerDescriptors (cognitive 25) src/renderers/webgpu/WebGPUBackend.js:1342 — WebGPUBackend._updateArrayCameraLayerDescriptors has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 4, 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 · WebGLShadowMap.WebGLShadowMap · ×1
  • WebGLShadowMap.WebGLShadowMap::renderObject (cognitive 25) src/renderers/webgl/WebGLShadowMap.js:520 — WebGLShadowMap.WebGLShadowMap::renderObject has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 7, loops 2 (5 pts) (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 · PlaygroundManager.loadPlaygroundFromHash (cognitive 25) · ×1
  • PlaygroundManager.loadPlaygroundFromHash (cognitive 25) tsl/js/managers/PlaygroundManager.js:171 — PlaygroundManager.loadPlaygroundFromHash has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 1 (3 pts), error handling 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 · generateMaterialXNodeInterfaceRegistry.parseNodeDefs (cognitive 25) · ×1
  • generateMaterialXNodeInterfaceRegistry.parseNodeDefs (cognitive 25) utils/generateMaterialXNodeInterfaceRegistry.js:71 — generateMaterialXNodeInterfaceRegistry.parseNodeDefs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 4, loops 2 (4 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 · updateLineGutter (cognitive 25) · ×1
  • updateLineGutter (cognitive 25) editor/js/libs/codemirror/codemirror.js:2177 — updateLineGutter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, ternaries 2 (4 pts), 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 · scrollPosIntoView (cognitive 25) · ×1
  • scrollPosIntoView (cognitive 25) editor/js/libs/codemirror/codemirror.js:3457 — scrollPosIntoView has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (8 pts), boolean chains 2, 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 · patchDisplay (cognitive 25) · ×1
  • patchDisplay (cognitive 25) editor/js/libs/codemirror/codemirror.js:4227 — patchDisplay has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 10). Of this number, 22 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · locateNodeInLineView · ×1
  • locateNodeInLineView::find (cognitive 25) editor/js/libs/codemirror/codemirror.js:9303 — locateNodeInLineView::find has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 2 (7 pts), loops 2 (3 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 · renderPlaygroundTabs (cognitive 25) · ×1
  • renderPlaygroundTabs (cognitive 25) tsl/js/managers/PlaygroundManager.js:273 — renderPlaygroundTabs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 27 function items inside it that branch ((anonymous)::ondrop, (anonymous)::ondragover, a function literal at line 398, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · updateDebugWGSL (cognitive 25) · ×1
  • updateDebugWGSL (cognitive 25) tsl/js/managers/PlaygroundManager.js:1022 — updateDebugWGSL has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 4). Of this number, 21 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · copy (cognitive 25) · ×1
  • copy (cognitive 25) src/materials/nodes/NodeMaterial.js:1337 — copy has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, loops 3 (4 pts), ternaries 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 · getSize (cognitive 25) · ×1
  • getSize (cognitive 25) src/renderers/common/Textures.js:538 — getSize has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (10 pts), ternaries 2 (4 pts) (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 · Selector.constructor (cognitive 24) · ×1
  • Selector.constructor (cognitive 24) editor/js/Selector.js:14 — Selector.constructor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). None of this is in the body itself: all 24 points belong to 2 function literals inside it that branch (lines 32, 90). 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 · ImageLoader.load (cognitive 24) · ×1
  • ImageLoader.load (cognitive 24) src/loaders/ImageLoader.js:45 — ImageLoader.load has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2, loops 2 (nesting depth added 8). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (onImageLoad, onImageError, a function literal at line 61). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · RenderObject.needsGeometryUpdate (cognitive 24) · ×1
  • RenderObject.needsGeometryUpdate (cognitive 24) src/renderers/common/RenderObject.js:925 — RenderObject.needsGeometryUpdate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), ternaries 1 (3 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 · MarkdownUtils.splitArguments (cognitive 24) · ×1
  • MarkdownUtils.splitArguments (cognitive 24) tsl/js/utils/MarkdownUtils.js:648 — MarkdownUtils.splitArguments has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 6, loops 1 (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 · MarkdownUtils.formatSignatureArgs (cognitive 24) · ×1
  • MarkdownUtils.formatSignatureArgs (cognitive 24) tsl/js/utils/MarkdownUtils.js:764 — MarkdownUtils.formatSignatureArgs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8, ternaries 1 (2 pts), loops 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 · Guide.setupTOC · ×1
  • Guide.setupTOC::createTOCNode (cognitive 24) REDACTED:2086 — Guide.setupTOC::createTOCNode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (24 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. This shape REPEATS in the file: one other method here (Guide.setupTOC) 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 · bidiSimplify (cognitive 24) · ×1
  • bidiSimplify (cognitive 24) editor/js/libs/codemirror/codemirror.js:7615 — bidiSimplify has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 7 (9 pts), boolean chains 6 (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 · defineOptions (cognitive 24) · ×1
  • defineOptions (cognitive 24) editor/js/libs/codemirror/codemirror.js:7710 — defineOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 5 (6 pts), boolean chains 4, loops 2 (nesting depth added 3). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 29 function items inside it that branch (a function literal at line 7776, option, a function literal at line 7745, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · isDeterministic (cognitive 24) · ×1
  • isDeterministic (cognitive 24) src/nodes/core/NodeBuilder.js:2463 — isDeterministic has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (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.
D2 · Cognitive Complexity · updateBinding (cognitive 24) · ×1
  • updateBinding (cognitive 24) src/renderers/webgl-fallback/WebGLBackend.js:2044 — updateBinding has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (7 pts), loops 1 (3 pts), boolean chains 2 (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 · tokenizeCodeToElement (cognitive 24) · ×1
  • tokenizeCodeToElement (cognitive 24) tsl/js/utils/MarkdownUtils.js:1388 — tokenizeCodeToElement has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 2 (6 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 · transformUv (cognitive 24) · ×1
  • transformUv (cognitive 24) src/textures/Texture.js:693 — transformUv has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (6 pts), match/switch 2 (4 pts), boolean chains 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 · codemirror.normalizeKeyMap (cognitive 23) · ×1
  • codemirror.normalizeKeyMap (cognitive 23) editor/js/libs/codemirror/codemirror.js:6776 — codemirror.normalizeKeyMap has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (5 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 · codemirror.onMouseDown (cognitive 23) · ×1
  • codemirror.onMouseDown (cognitive 23) editor/js/libs/codemirror/codemirror.js:7337 — codemirror.onMouseDown has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4, ternaries 1 (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 · codemirror.domTextBetween · ×1
  • codemirror.domTextBetween::walk (cognitive 23) editor/js/libs/codemirror/codemirror.js:9226 — codemirror.domTextBetween::walk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Vector4.setAxisAngleFromRotationMatrix (cognitive 23) · ×1
  • Vector4.setAxisAngleFromRotationMatrix (cognitive 23) src/math/Vector4.js:527 — Vector4.setAxisAngleFromRotationMatrix has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3 (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 · UniformsUtils.cloneUniforms (cognitive 23) · ×1
  • UniformsUtils.cloneUniforms (cognitive 23) src/renderers/shaders/UniformsUtils.js:18 — UniformsUtils.cloneUniforms has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (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 · CompressedTextureLoader.load (cognitive 23) · ×1
  • CompressedTextureLoader.load (cognitive 23) src/loaders/CompressedTextureLoader.js:41 — CompressedTextureLoader.load has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (9 pts) (nesting depth added 11). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 102, 61). 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 · Morph.morphReference (cognitive 23) · ×1
  • Morph.morphReference (cognitive 23) src/nodes/accessors/Morph.js:227 — Morph.morphReference has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 7, ternaries 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 11 belong to 3 function literals 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 · CubeMapNode.updateBefore (cognitive 23) · ×1
  • CubeMapNode.updateBefore (cognitive 23) src/nodes/utils/CubeMapNode.js:82 — CubeMapNode.updateBefore has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, ternaries 1 (2 pts) (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 · Pipelines.getForRender (cognitive 23) · ×1
  • Pipelines.getForRender (cognitive 23) src/renderers/common/Pipelines.js:166 — Pipelines.getForRender has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 1 (2 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 · WebGPUPipelineUtils._reportShaderDiagnostics (cognitive 23) · ×1
  • WebGPUPipelineUtils._reportShaderDiagnostics (cognitive 23) src/renderers/webgpu/utils/WebGPUPipelineUtils.js:519 — WebGPUPipelineUtils._reportShaderDiagnostics has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 3 (9 pts), loops 2 (3 pts), boolean chains 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 · WebGLMaterials.WebGLMaterials.refreshMaterialUniforms (cognitive 23) · ×1
  • WebGLMaterials.WebGLMaterials.refreshMaterialUniforms (cognitive 23) src/renderers/webgl/WebGLMaterials.js:42 — WebGLMaterials.WebGLMaterials.refreshMaterialUniforms has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (23 pts) (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 · MarkdownUtils.splitTypeTokens (cognitive 23) · ×1
  • MarkdownUtils.splitTypeTokens (cognitive 23) tsl/js/utils/MarkdownUtils.js:691 — MarkdownUtils.splitTypeTokens has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5, loops 1 (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 · markedSpansBefore (cognitive 23) · ×1
  • markedSpansBefore (cognitive 23) editor/js/libs/codemirror/codemirror.js:1340 — markedSpansBefore has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 3 (11 pts), boolean chains 6, if/else 2 (4 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 · calculateScrollPos (cognitive 23) · ×1
  • calculateScrollPos (cognitive 23) editor/js/libs/codemirror/codemirror.js:3501 — calculateScrollPos has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 9 (10 pts), boolean chains 2 (nesting depth added 5). 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 · endOperation_finish (cognitive 23) · ×1
  • endOperation_finish (cognitive 23) editor/js/libs/codemirror/codemirror.js:3912 — endOperation_finish has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeMirror (cognitive 23) · ×1
  • CodeMirror (cognitive 23) editor/js/libs/codemirror/codemirror.js:7885 — CodeMirror has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 2). Of this number, 20 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · poll (cognitive 23) · ×1
  • poll (cognitive 23) editor/js/libs/codemirror/codemirror.js:9550 — poll has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 10, loops 1, ternaries 1 (nesting depth added 2). Of this number, 18 points are the body's own statements and 5 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 · format (cognitive 23) · ×1
  • format (cognitive 23) src/nodes/core/NodeBuilder.js:3803 — format has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10, boolean chains 7, ternaries 3 (6 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.
D2 · Cognitive Complexity · maybeTagAsGeneric (cognitive 23) · ×1
  • maybeTagAsGeneric (cognitive 23) editor/js/libs/ternjs/infer.js:872 — maybeTagAsGeneric has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, loops 2, ternaries 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (explore, parsed). 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 · isEarHashed (cognitive 23) · ×1
  • isEarHashed (cognitive 23) src/extras/lib/earcut.js:163 — isEarHashed has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (9 pts), loops 3 (nesting depth added 4). 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 · WebGLMaterials.refreshMaterialUniforms (cognitive 23) · ×1
  • WebGLMaterials.refreshMaterialUniforms (cognitive 23) src/renderers/webgl/WebGLMaterials.js:42 — WebGLMaterials.refreshMaterialUniforms has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (23 pts) (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 · Viewport.Info.ViewportInfo (cognitive 22) · ×1
  • Viewport.Info.ViewportInfo (cognitive 22) editor/js/Viewport.Info.js:3 — Viewport.Info.ViewportInfo has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 5, boolean chains 3, loops 1 (nesting depth added 8). None of this is in the body itself: all 22 points belong to 4 function items inside it that branch (a function literal at line 56, update, a function literal at line 118, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Sidebar.Geometry.SidebarGeometry · ×1
  • Sidebar.Geometry.SidebarGeometry::build (cognitive 22) editor/js/Sidebar.Geometry.js:279 — Sidebar.Geometry.SidebarGeometry::build has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 1 (3 pts), 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 · codemirror.triggerElectric (cognitive 22) · ×1
  • codemirror.triggerElectric (cognitive 22) editor/js/libs/codemirror/codemirror.js:8206 — codemirror.triggerElectric has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 3 (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 · ShaderMaterial.toJSON (cognitive 22) · ×1
  • ShaderMaterial.toJSON (cognitive 22) src/materials/ShaderMaterial.js:311 — ShaderMaterial.toJSON has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 7, loops 2 (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 · ImageBitmapLoader.load (cognitive 22) · ×1
  • ImageBitmapLoader.load (cognitive 22) src/loaders/ImageBitmapLoader.js:111 — ImageBitmapLoader.load has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 130, 156, 183, …). 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 · FunctionOverloadingNode.getCandidateFn (cognitive 22) · ×1
  • FunctionOverloadingNode.getCandidateFn (cognitive 22) src/nodes/utils/FunctionOverloadingNode.js:88 — FunctionOverloadingNode.getCandidateFn has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (6 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 · Textures._destroyTexture (cognitive 22) · ×1
  • Textures._destroyTexture (cognitive 22) src/renderers/common/Textures.js:687 — Textures._destroyTexture has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (7 pts), boolean chains 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 · WGSLNodeBuilder.getVaryings (cognitive 22) · ×1
  • WGSLNodeBuilder.getVaryings (cognitive 22) src/renderers/webgpu/nodes/WGSLNodeBuilder.js:2137 — WGSLNodeBuilder.getVaryings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · findPosH · ×1
  • findPosH::moveOnce (cognitive 22) editor/js/libs/codemirror/codemirror.js:8721 — findPosH::moveOnce has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3 (8 pts), boolean chains 3 (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 · updateBindings (cognitive 22) · ×1
  • updateBindings (cognitive 22) src/renderers/webgl-fallback/WebGLBackend.js:1977 — updateBindings has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 2 (9 pts), if/else 4 (7 pts), loops 2 (5 pts), boolean chains 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 · getRenderObjectData (cognitive 22) · ×1
  • getRenderObjectData (cognitive 22) src/materials/nodes/manager/NodeMaterialObserver.js:234 — getRenderObjectData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (11 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 · earcut (cognitive 22) · ×1
  • earcut (cognitive 22) src/extras/lib/earcut.js:5 — earcut has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getVertexBufferLayout (cognitive 22) · ×1
  • getVertexBufferLayout (cognitive 22) src/renderers/webgpu/utils/WebGPUAttributeUtils.js:341 — getVertexBufferLayout has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 3 (10 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 · def.passOne (cognitive 21) · ×1
  • def.passOne (cognitive 21) editor/js/libs/ternjs/def.js:354 — def.passOne has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tern.analyzeAll (cognitive 21) · ×1
  • tern.analyzeAll (cognitive 21) editor/js/libs/ternjs/tern.js:296 — tern.analyzeAll has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (5 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 · prettify.sourceDecorator (cognitive 21) · ×1
  • prettify.sourceDecorator (cognitive 21) REDACTED:805 — prettify.sourceDecorator has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 2 (4 pts) (nesting depth added 5). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · Color.setStyle (cognitive 21) · ×1
  • Color.setStyle (cognitive 21) src/math/Color.js:286 — Color.setStyle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Material.setValues (cognitive 21) · ×1
  • Material.setValues (cognitive 21) src/materials/Material.js:557 — Material.setValues has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (9 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NodeUtils.getValueFromType (cognitive 21) · ×1
  • NodeUtils.getValueFromType (cognitive 21) src/nodes/core/NodeUtils.js:370 — NodeUtils.getValueFromType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 4, ternaries 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 · NodeBuilder.getPromotedComponentType (cognitive 21) · ×1
  • NodeBuilder.getPromotedComponentType (cognitive 21) src/nodes/core/NodeBuilder.js:1996 — NodeBuilder.getPromotedComponentType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, ternaries 1 (2 pts), loops 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 · WebGLVertexArrayUtils.getVAO (cognitive 21) · ×1
  • WebGLVertexArrayUtils.getVAO (cognitive 21) src/renderers/webgl-fallback/utils/WebGLVertexArrayUtils.js:45 — WebGLVertexArrayUtils.getVAO has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), ternaries 2, 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 · WebGLTextureUtils.setTextureParameters (cognitive 21) · ×1
  • WebGLTextureUtils.setTextureParameters (cognitive 21) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:325 — WebGLTextureUtils.setTextureParameters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, ternaries 3 (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 · CodeCompiler.removeUnusedImports · ×1
  • CodeCompiler.removeUnusedImports::getFullLineRange (cognitive 21) tsl/js/code/CodeCompiler.js:1383 — CodeCompiler.removeUnusedImports::getFullLineRange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, loops 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 · build.categorize (cognitive 21) · ×1
  • build.categorize (cognitive 21) utils/llms/build.js:566 — build.categorize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 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 · addChangeToHistory (cognitive 21) · ×1
  • addChangeToHistory (cognitive 21) editor/js/libs/codemirror/codemirror.js:4898 — addChangeToHistory has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 1 (2 pts), ternaries 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 · _createArrayCameraLayerDescriptors (cognitive 21) · ×1
  • _createArrayCameraLayerDescriptors (cognitive 21) src/renderers/webgpu/WebGPUBackend.js:1233 — _createArrayCameraLayerDescriptors has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 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 · UIOutliner.setOptions (cognitive 20) · ×1
  • UIOutliner.setOptions (cognitive 20) editor/js/libs/ui.three.js:342 — UIOutliner.setOptions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (17 pts), loops 2, boolean chains 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (onDrop, onDragOver, moveObject, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · codemirror.makeChangeSingleDocInEditor (cognitive 20) · ×1
  • codemirror.makeChangeSingleDocInEditor (cognitive 20) editor/js/libs/codemirror/codemirror.js:5471 — codemirror.makeChangeSingleDocInEditor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 3 (nesting depth added 5). Of this number, 16 points are the body's own statements and 4 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 · Euler.setFromRotationMatrix (cognitive 20) · ×1
  • Euler.setFromRotationMatrix (cognitive 20) src/math/Euler.js:189 — Euler.setFromRotationMatrix has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 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 · Ray.intersectBox (cognitive 20) · ×1
  • Ray.intersectBox (cognitive 20) src/math/Ray.js:449 — Ray.intersectBox has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 6, 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 · CatmullRomCurve3.getPoint (cognitive 20) · ×1
  • CatmullRomCurve3.getPoint (cognitive 20) src/extras/curves/CatmullRomCurve3.js:175 — CatmullRomCurve3.getPoint has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, ternaries 1 (2 pts) (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 · TSLCore.getProxyParameters (cognitive 20) · ×1
  • TSLCore.getProxyParameters (cognitive 20) src/nodes/tsl/TSLCore.js:769 — TSLCore.getProxyParameters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (20 pts) (nesting depth added 9). None of this is in the body itself: all 20 points belong to 2 function literals inside it that branch (lines 777, 791). 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 · Bindings.updateSharedForRender (cognitive 20) · ×1
  • Bindings.updateSharedForRender (cognitive 20) src/renderers/common/Bindings.js:244 — Bindings.updateSharedForRender has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (3 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 · Renderer.compileComputeAsync (cognitive 20) · ×1
  • Renderer.compileComputeAsync (cognitive 20) src/renderers/common/Renderer.js:1311 — Renderer.compileComputeAsync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 6). Of this number, 18 points are the body's own statements and 2 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 · GLSLNodeBuilder.getUniformFromNode (cognitive 20) · ×1
  • GLSLNodeBuilder.getUniformFromNode (cognitive 20) src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:1887 — GLSLNodeBuilder.getUniformFromNode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, 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 · WebGLBindingStates.WebGLBindingStates.saveCache (cognitive 20) · ×1
  • WebGLBindingStates.WebGLBindingStates.saveCache (cognitive 20) src/renderers/webgl/WebGLBindingStates.js:194 — WebGLBindingStates.WebGLBindingStates.saveCache has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (16 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 · WebGLMaterials.WebGLMaterials.refreshUniformsCommon (cognitive 20) · ×1
  • WebGLMaterials.WebGLMaterials.refreshUniformsCommon (cognitive 20) src/renderers/webgl/WebGLMaterials.js:138 — WebGLMaterials.WebGLMaterials.refreshUniformsCommon has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · publish.buildMainNav (cognitive 20) · ×1
  • publish.buildMainNav (cognitive 20) utils/docs/template/publish.js:451 — publish.buildMainNav has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (9 pts) (nesting depth added 11). Of this number, 10 points are the body's own statements and 10 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 · normalizeSelection (cognitive 20) · ×1
  • normalizeSelection (cognitive 20) editor/js/libs/codemirror/codemirror.js:4648 — normalizeSelection has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 2 (5 pts), boolean chains 2, 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 · find (cognitive 20) · ×1
  • find (cognitive 20) editor/js/libs/codemirror/codemirror.js:5907 — find has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (6 pts), boolean chains 2, 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 · configureMouse (cognitive 20) · ×1
  • configureMouse (cognitive 20) editor/js/libs/codemirror/codemirror.js:7394 — configureMouse has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 4, boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · init (cognitive 20) · ×1
  • init (cognitive 20) src/renderers/webgpu/WebGPUBackend.js:201 — init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 5). Of this number, 13 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · toJSON (cognitive 20) · ×1
  • toJSON (cognitive 20) src/core/BufferGeometry.js:1222 — toJSON has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4 (6 pts), boolean chains 2, ternaries 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 · getProxyParameters · ×1
  • getProxyParameters::get (cognitive 20) src/nodes/tsl/TSLCore.js:777 — getProxyParameters::get has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (20 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 · createComputePipeline (cognitive 20) · ×1
  • createComputePipeline (cognitive 20) src/renderers/webgpu/utils/WebGPUPipelineUtils.js:384 — createComputePipeline has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, error handling 2 (5 pts), loops 1, ternaries 1 (nesting depth added 6). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 443, 427). 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 · addType (cognitive 20) · ×1
  • addType (cognitive 20) editor/js/libs/ternjs/def.js:489 — addType has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, loops 1 (3 pts) (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 · open (cognitive 20) · ×1
  • open (cognitive 20) manual/resources/tools/geo-picking/shapefile.js:430 — open has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 5). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WebGLMaterials.refreshUniformsCommon (cognitive 20) · ×1
  • WebGLMaterials.refreshUniformsCommon (cognitive 20) src/renderers/webgl/WebGLMaterials.js:138 — WebGLMaterials.refreshUniformsCommon has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WebGLBindingStates.saveCache (cognitive 20) · ×1
  • WebGLBindingStates.saveCache (cognitive 20) src/renderers/webgl/WebGLBindingStates.js:194 — WebGLBindingStates.saveCache has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (16 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 · codemirror.getBidiPartAt (cognitive 19) · ×1
  • codemirror.getBidiPartAt (cognitive 19) editor/js/libs/codemirror/codemirror.js:329 — codemirror.getBidiPartAt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirror.mergeOldSpans (cognitive 19) · ×1
  • codemirror.mergeOldSpans (cognitive 19) editor/js/libs/codemirror/codemirror.js:5018 — codemirror.mergeOldSpans has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (8 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 · codemirror.TextareaInput.init (cognitive 19) · ×1
  • codemirror.TextareaInput.init (cognitive 19) editor/js/libs/codemirror/codemirror.js:9355 — codemirror.TextareaInput.init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 3 (nesting depth added 1). 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 (prepareCopyCut, a function literal at line 9401, a function literal at line 9367, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Texture.setValues (cognitive 19) · ×1
  • Texture.setValues (cognitive 19) src/textures/Texture.js:550 — Texture.setValues has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CurvePath.getPoints (cognitive 19) · ×1
  • CurvePath.getPoints (cognitive 19) src/extras/core/CurvePath.js:208 — CurvePath.getPoints has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (4 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · SphereGeometry.constructor (cognitive 19) · ×1
  • SphereGeometry.constructor (cognitive 19) src/geometries/SphereGeometry.js:31 — SphereGeometry.constructor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 pts), boolean chains 4 (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 · KeyframeTrack.validate (cognitive 19) · ×1
  • KeyframeTrack.validate (cognitive 19) src/animation/KeyframeTrack.js:410 — KeyframeTrack.validate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 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 · LightsNode.setupLightsNode (cognitive 19) · ×1
  • LightsNode.setupLightsNode (cognitive 19) src/nodes/lighting/LightsNode.js:233 — LightsNode.setupLightsNode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 1, 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 · Bindings._createBindings (cognitive 19) · ×1
  • Bindings._createBindings (cognitive 19) src/renderers/common/Bindings.js:312 — Bindings._createBindings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 1 (5 pts), loops 2 (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 · XRManager.onInputSourcesChange (cognitive 19) · ×1
  • XRManager.onInputSourcesChange (cognitive 19) src/renderers/common/XRManager.js:1669 — XRManager.onInputSourcesChange has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 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 · WebGLAttributeUtils.createAttribute (cognitive 19) · ×1
  • WebGLAttributeUtils.createAttribute (cognitive 19) src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js:79 — WebGLAttributeUtils.createAttribute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 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 · WGSLNodeFunction.parse (cognitive 19) · ×1
  • WGSLNodeFunction.parse (cognitive 19) src/renderers/webgpu/nodes/WGSLNodeFunction.js:79 — WGSLNodeFunction.parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SearchManager.getRankedTree · ×1
  • SearchManager.getRankedTree::processNodes (cognitive 19) REDACTED:216 — SearchManager.getRankedTree::processNodes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, 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 · onKeyDown (cognitive 19) · ×1
  • onKeyDown (cognitive 19) editor/js/libs/codemirror/codemirror.js:7244 — onKeyDown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, ternaries 2 (5 pts) (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 · _getFrameBufferTarget (cognitive 19) · ×1
  • _getFrameBufferTarget (cognitive 19) src/renderers/common/Renderer.js:1828 — _getFrameBufferTarget has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 12, if/else 5 (6 pts), boolean chains 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 2 belong 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 · _createExternalTextureViews (cognitive 19) · ×1
  • _createExternalTextureViews (cognitive 19) src/renderers/webgpu/WebGPUBackend.js:619 — _createExternalTextureViews has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (10 pts), boolean chains 5, if/else 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderPage · ×1
  • renderPage::(anonymous)::onclick (cognitive 19) REDACTED:1750 — renderPage::(anonymous)::onclick has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4 (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 · setupPBO (cognitive 19) · ×1
  • setupPBO (cognitive 19) src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:426 — setupPBO has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 5 (7 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 · setGeometryAt (cognitive 19) · ×1
  • setGeometryAt (cognitive 19) src/objects/BatchedMesh.js:719 — setGeometryAt has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 5, boolean chains 2, ternaries 2 (nesting depth added 5). 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 · optimize (cognitive 19) · ×1
  • optimize (cognitive 19) src/objects/BatchedMesh.js:884 — optimize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (8 pts), ternaries 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 · ConvertType (cognitive 19) · ×1
  • ConvertType (cognitive 19) src/nodes/tsl/TSLCore.js:949 — ConvertType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 1 (nesting depth added 6). None of this is in the body itself: all 19 points belong to 3 function literals inside it that branch (lines 951, 965, 1004). 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 · XR.constructor (cognitive 18) · ×1
  • XR.constructor (cognitive 18) editor/js/Viewport.XR.js:10 — XR.constructor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 1 (2 pts) (nesting depth added 7). None of this is in the body itself: all 18 points belong to 5 function items inside it that branch (onSessionStarted::onSelect, onSessionStarted, onSessionStarted::onControllerEvent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · codemirror.prepareSelection (cognitive 18) · ×1
  • codemirror.prepareSelection (cognitive 18) editor/js/libs/codemirror/codemirror.js:3150 — codemirror.prepareSelection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, 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 · codemirror.makeChange (cognitive 18) · ×1
  • codemirror.makeChange (cognitive 18) editor/js/libs/codemirror/codemirror.js:5303 — codemirror.makeChange has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 1 (3 pts), 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 · ObjectLoader.parseGeometries (cognitive 18) · ×1
  • ObjectLoader.parseGeometries (cognitive 18) src/loaders/ObjectLoader.js:350 — ObjectLoader.parseGeometries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FunctionCallNode.generate (cognitive 18) · ×1
  • FunctionCallNode.generate (cognitive 18) src/nodes/code/FunctionCallNode.js:98 — FunctionCallNode.generate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (7 pts) (nesting depth added 7). 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, split the body into named stages: move each independent 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 · PMREMNode._getPMREMFromTexture (cognitive 18) · ×1
  • PMREMNode._getPMREMFromTexture (cognitive 18) src/nodes/pmrem/PMREMNode.js:23 — PMREMNode._getPMREMFromTexture has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (nesting depth added 8). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderObject.getAttributes (cognitive 18) · ×1
  • RenderObject.getAttributes (cognitive 18) src/renderers/common/RenderObject.js:585 — RenderObject.getAttributes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 1 (2 pts), boolean chains 1, 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 · NodeBuilder.getBindings (cognitive 18) · ×1
  • NodeBuilder.getBindings (cognitive 18) src/nodes/core/NodeBuilder.js:781 — NodeBuilder.getBindings has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 11). 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 · WebGLBackend.finishRender (cognitive 18) · ×1
  • WebGLBackend.finishRender (cognitive 18) src/renderers/webgl-fallback/WebGLBackend.js:547 — WebGLBackend.finishRender has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 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 · WebGLBackend.resolveOccludedAsync (cognitive 18) · ×1
  • WebGLBackend.resolveOccludedAsync (cognitive 18) src/renderers/webgl-fallback/WebGLBackend.js:634 — WebGLBackend.resolveOccludedAsync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (check). 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 · WebGPUBackend.compute (cognitive 18) · ×1
  • WebGPUBackend.compute (cognitive 18) src/renderers/webgpu/WebGPUBackend.js:1912 — WebGPUBackend.compute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 2 (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 · WebGLBackground.WebGLBackground.addToRenderList (cognitive 18) · ×1
  • WebGLBackground.WebGLBackground.addToRenderList (cognitive 18) src/renderers/webgl/WebGLBackground.js:88 — WebGLBackground.WebGLBackground.addToRenderList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4 (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 · WebGLUniformsGroups.WebGLUniformsGroups.hasValueChanged (cognitive 18) · ×1
  • WebGLUniformsGroups.WebGLUniformsGroups.hasValueChanged (cognitive 18) src/renderers/webgl/WebGLUniformsGroups.js:195 — WebGLUniformsGroups.WebGLUniformsGroups.hasValueChanged has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 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 · viewCuttingPoint (cognitive 18) · ×1
  • viewCuttingPoint (cognitive 18) editor/js/libs/codemirror/codemirror.js:3089 — viewCuttingPoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (5 pts), loops 2, 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 · update (cognitive 18) · ×1
  • update (cognitive 18) editor/js/libs/codemirror/codemirror.js:3648 — update has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · updateDisplayIfNeeded (cognitive 18) · ×1
  • updateDisplayIfNeeded (cognitive 18) editor/js/libs/codemirror/codemirror.js:4106 — updateDisplayIfNeeded has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 8. 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 · fromTextArea (cognitive 18) · ×1
  • fromTextArea (cognitive 18) editor/js/libs/codemirror/codemirror.js:9701 — fromTextArea has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1 (3 pts), ternaries 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 4 belong to 6 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 · generateTextureDimension (cognitive 18) · ×1
  • generateTextureDimension (cognitive 18) src/renderers/webgpu/nodes/WGSLNodeBuilder.js:559 — generateTextureDimension has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (3 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 · numberLines (cognitive 18) · ×1
  • numberLines (cognitive 18) REDACTED:991 — numberLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 23 (53 pts), loops 9 (19 pts), boolean chains 8, ternaries 3 (nesting depth added 40). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · computeBoundingBox (cognitive 18) · ×1
  • computeBoundingBox (cognitive 18) src/core/BufferGeometry.js:643 — computeBoundingBox has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (3 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 · setupLighting (cognitive 18) · ×1
  • setupLighting (cognitive 18) src/materials/nodes/NodeMaterial.js:1102 — setupLighting has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, ternaries 4 (6 pts), if/else 3 (nesting depth added 2). 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 · (anonymous) (cognitive 18) · ×1
  • (anonymous) (cognitive 18) src/materials/nodes/Line2NodeMaterial.js:306 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getSearchSnippet (cognitive 18) · ×1
  • getSearchSnippet (cognitive 18) REDACTED:628 — getSearchSnippet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (2 pts), loops 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 · build-defs.parseDoc (cognitive 17) · ×1
  • build-defs.parseDoc (cognitive 17) editor/js/libs/tern-threejs/build-defs.js:53 — build-defs.parseDoc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2, 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 · codemirror.lineIsHidden (cognitive 17) · ×1
  • codemirror.lineIsHidden (cognitive 17) editor/js/libs/codemirror/codemirror.js:1602 — codemirror.lineIsHidden has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 2, 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 · codemirror.postUpdateDisplay (cognitive 17) · ×1
  • codemirror.postUpdateDisplay (cognitive 17) editor/js/libs/codemirror/codemirror.js:4178 — codemirror.postUpdateDisplay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, 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 · codemirror.rebaseHistArray (cognitive 17) · ×1
  • codemirror.rebaseHistArray (cognitive 17) editor/js/libs/codemirror/codemirror.js:5556 — codemirror.rebaseHistArray has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 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 · codemirror.leftButtonStartDrag (cognitive 17) · ×1
  • codemirror.leftButtonStartDrag (cognitive 17) editor/js/libs/codemirror/codemirror.js:7425 — codemirror.leftButtonStartDrag 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: 2 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 7427, mouseMove). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · codemirror.domToPos (cognitive 17) · ×1
  • codemirror.domToPos (cognitive 17) editor/js/libs/codemirror/codemirror.js:9263 — codemirror.domToPos has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (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.
D2 · Cognitive Complexity · BufferGeometry.computeVertexNormals (cognitive 17) · ×1
  • BufferGeometry.computeVertexNormals (cognitive 17) src/core/BufferGeometry.js:997 — BufferGeometry.computeVertexNormals has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 5 (7 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 · PropertyBinding.findNode (cognitive 17) · ×1
  • PropertyBinding.findNode (cognitive 17) REDACTED:266 — PropertyBinding.findNode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (searchNodeSubtree). 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 · StackNode.build (cognitive 17) · ×1
  • StackNode.build (cognitive 17) src/nodes/core/StackNode.js:369 — StackNode.build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 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 · NodeMaterialObserver.getMaterialData (cognitive 17) · ×1
  • NodeMaterialObserver.getMaterialData (cognitive 17) src/materials/nodes/manager/NodeMaterialObserver.js:543 — NodeMaterialObserver.getMaterialData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 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 · Background.update (cognitive 17) · ×1
  • Background.update (cognitive 17) src/renderers/common/Background.js:57 — Background.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NodeBuilder._getLayoutInputs (cognitive 17) · ×1
  • NodeBuilder._getLayoutInputs (cognitive 17) src/nodes/core/NodeBuilder.js:2829 — NodeBuilder._getLayoutInputs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (6 pts), boolean chains 3 (nesting depth added 2). Of this number, 12 points are the body's own statements and 5 belong to 3 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.
D2 · Cognitive Complexity · NodeManager.getCacheKey (cognitive 17) · ×1
  • NodeManager.getCacheKey (cognitive 17) src/renderers/common/nodes/NodeManager.js:686 — NodeManager.getCacheKey has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (7 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 · WebGLState._setMRTBlendingIndex (cognitive 17) · ×1
  • WebGLState._setMRTBlendingIndex (cognitive 17) src/renderers/webgl-fallback/utils/WebGLState.js:369 — WebGLState._setMRTBlendingIndex has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 2 (6 pts), ternaries 3 (6 pts), if/else 4 (5 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 · WebGLTextureUtils.deallocateRenderBuffers (cognitive 17) · ×1
  • WebGLTextureUtils.deallocateRenderBuffers (cognitive 17) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:764 — WebGLTextureUtils.deallocateRenderBuffers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (6 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 · WebGLTextureUtils.copyFramebufferToTexture (cognitive 17) · ×1
  • WebGLTextureUtils.copyFramebufferToTexture (cognitive 17) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:1100 — WebGLTextureUtils.copyFramebufferToTexture has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 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 · WebGLTextureUtils._getBytesPerTexel (cognitive 17) · ×1
  • WebGLTextureUtils._getBytesPerTexel (cognitive 17) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:1374 — WebGLTextureUtils._getBytesPerTexel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. 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 · WebGLClipping.WebGLClipping (cognitive 17) · ×1
  • WebGLClipping.WebGLClipping (cognitive 17) src/renderers/webgl/WebGLClipping.js:4 — WebGLClipping.WebGLClipping has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, loops 1 (3 pts), ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (projectPlanes, resetGlobalState, a function literal at line 22, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Guide.setupTOC (cognitive 17) · ×1
  • Guide.setupTOC (cognitive 17) REDACTED:2043 — Guide.setupTOC has cognitive complexity 17 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 4, loops 1 (2 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. This shape REPEATS in the file: one other method here (Guide.setupTOC::createTOCNode) 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 · onKeyPress (cognitive 17) · ×1
  • onKeyPress (cognitive 17) editor/js/libs/codemirror/codemirror.js:7288 — onKeyPress has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 1. 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 · addType (cognitive 17) · ×1
  • addType (cognitive 17) editor/js/libs/ternjs/infer.js:356 — addType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), boolean chains 2, ternaries 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 · renderObject (cognitive 17) · ×1
  • renderObject (cognitive 17) devtools/panel/panel.js:392 — renderObject has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, ternaries 2, loops 1, other 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 2 belong to 9 function literals 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 · Sidebar.Geometry.BufferGeometry.SidebarGeometryBufferGeometry · ×1
  • Sidebar.Geometry.BufferGeometry.SidebarGeometryBufferGeometry::update (cognitive 16) editor/js/Sidebar.Geometry.BufferGeometry.js:11 — Sidebar.Geometry.BufferGeometry.SidebarGeometryBufferGeometry::update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (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 · Menubar.View.MenubarView (cognitive 16) · ×1
  • Menubar.View.MenubarView (cognitive 16) editor/js/Menubar.View.js:3 — Menubar.View.MenubarView has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 pts) (nesting depth added 6). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 106, 144, 161). 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 · codemirror.updateDoc (cognitive 16) · ×1
  • codemirror.updateDoc (cognitive 16) editor/js/libs/codemirror/codemirror.js:4756 — codemirror.updateDoc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1, ternaries 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · infer.AVal.purge (cognitive 16) · ×1
  • infer.AVal.purge (cognitive 16) editor/js/libs/ternjs/infer.js:1302 — infer.AVal.purge 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 · tern.ensureFile (cognitive 16) · ×1
  • tern.ensureFile (cognitive 16) editor/js/libs/ternjs/tern.js:233 — tern.ensureFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2 (nesting depth added 6). 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, split the body into named stages: move each independent 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 · prettify.extractSourceSpans · ×1
  • prettify.extractSourceSpans::walk (cognitive 16) REDACTED:536 — prettify.extractSourceSpans::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · ImageUtils.sRGBToLinear (cognitive 16) · ×1
  • ImageUtils.sRGBToLinear (cognitive 16) src/extras/ImageUtils.js:73 — ImageUtils.sRGBToLinear has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, loops 2 (4 pts) (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 · TextureSource.toJSON (cognitive 16) · ×1
  • TextureSource.toJSON (cognitive 16) src/textures/TextureSource.js:131 — TextureSource.toJSON has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 1 (3 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 · DataUtils._generateTables (cognitive 16) · ×1
  • DataUtils._generateTables (cognitive 16) src/extras/DataUtils.js:8 — DataUtils._generateTables has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 7 (8 pts) (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 · ShaderMaterial.fromJSON (cognitive 16) · ×1
  • ShaderMaterial.fromJSON (cognitive 16) src/materials/ShaderMaterial.js:413 — ShaderMaterial.fromJSON has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AnimationUtils.subclip (cognitive 16) · ×1
  • AnimationUtils.subclip (cognitive 16) src/animation/AnimationUtils.js:183 — AnimationUtils.subclip has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 3 (7 pts), boolean chains 1 (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 · CubeCamera.update (cognitive 16) · ×1
  • CubeCamera.update (cognitive 16) src/cameras/CubeCamera.js:178 — CubeCamera.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. 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 · AnimationAction._updateTimeScale (cognitive 16) · ×1
  • AnimationAction._updateTimeScale (cognitive 16) src/animation/AnimationAction.js:675 — AnimationAction._updateTimeScale has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (16 pts) (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 · Node.deserialize (cognitive 16) · ×1
  • Node.deserialize (cognitive 16) src/nodes/core/Node.js:1391 — Node.deserialize has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 4 (6 pts) (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 · LightsNode.customCacheKey (cognitive 16) · ×1
  • LightsNode.customCacheKey (cognitive 16) src/nodes/lighting/LightsNode.js:153 — LightsNode.customCacheKey has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 2 (4 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 · Renderer._bundleNeedsUpdate (cognitive 16) · ×1
  • Renderer._bundleNeedsUpdate (cognitive 16) src/renderers/common/Renderer.js:1624 — Renderer._bundleNeedsUpdate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 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 · transposeChars (cognitive 16) · ×1
  • transposeChars (cognitive 16) editor/js/libs/codemirror/codemirror.js:7087 — transposeChars has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 7087). 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 · compute (cognitive 16) · ×1
  • compute (cognitive 16) src/renderers/webgl-fallback/WebGLBackend.js:928 — compute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 5, boolean chains 3, ternaries 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 · startRenameTab (cognitive 16) · ×1
  • startRenameTab (cognitive 16) tsl/js/managers/PlaygroundManager.js:795 — startRenameTab has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (finishRename, onkeydown, a function literal at line 819, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ShaderNodeProxy (cognitive 16) · ×1
  • ShaderNodeProxy (cognitive 16) src/nodes/tsl/TSLCore.js:336 — ShaderNodeProxy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 2). 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 items inside it that branch (verifyParamsLimit, assignNode, setParameterLength, …). 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 · earcutLinked (cognitive 16) · ×1
  • earcutLinked (cognitive 16) src/extras/lib/earcut.js:87 — earcutLinked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 1 (3 pts), boolean chains 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 · addHelper (cognitive 16) · ×1
  • addHelper (cognitive 16) editor/js/Editor.js:393 — addHelper has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 2 function items inside it that branch (a function literal at line 398, (anonymous)::updateMatrixWorld). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · renderObjectDetails (cognitive 16) · ×1
  • renderObjectDetails (cognitive 16) devtools/panel/panel.js:510 — renderObjectDetails has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (4 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 · updateBinding (cognitive 16) · ×1
  • updateBinding (cognitive 16) src/renderers/webgpu/utils/WebGPUBindingUtils.js:193 — updateBinding has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (5 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.
D22 · Internal API Consistency · Inconsistent state persistence API. ArcballControls exposes `saveState()`, `pasteState()`, and `copyState()`, while OrbitControls only exposes `saveState()` and lacks corresponding retrieval methods (`pasteState`/`copyState`). This forces consumers to use different patterns for similar functionality across control types. · ×1
  • Inconsistent state persistence API. ArcballControls exposes `saveState()`, `pasteState()`, and `copyState()`, while OrbitControls only exposes `saveState()` and lacks corresponding retrieval methods (`pasteState`/`copyState`). This forces consumers to use different patterns for similar functionality across control types. — Add `pasteState()` and `copyState()` to OrbitControls to match ArcballControls, or remove the extra methods from ArcballControls if they are deemed redundant with `setStateFromJSON`. (signatures: ArcballControls.saveState() | OrbitControls.saveState())
D22 · Internal API Consistency · Inconsistent deserialization naming. `ArcballControls` uses `setStateFromJSON` while `NURBSCurve` uses `fromJSON`. While the domains differ (runtime state vs object construction), the inconsistency in verb choice (`setState` vs `from`) is notable in a unified API. · ×1
  • Inconsistent deserialization naming. `ArcballControls` uses `setStateFromJSON` while `NURBSCurve` uses `fromJSON`. While the domains differ (runtime state vs object construction), the inconsistency in verb choice (`setState` vs `from`) is notable in a unified API. — Standardize on `fromJSON` for all deserialization operations or `setStateFromJSON` if the intent is strictly state restoration. Given `NURBSCurve` creates a new instance, `fromJSON` is likely more appropriate, but `ArcballControls` should align its naming convention for consistency. (signatures: ArcballControls.setStateFromJSON(json) | NURBSCurve.fromJSON(json))
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M1 · Documentation (README) · README may be stale · ×1
  • README may be stale — 512 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking editor/js/Loader.js:974 — `unzipSync` in `handleZIP` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 1209 plain JS — the untyped files are devtools/background.js, devtools/bridge.js, devtools/constants.js, devtools/content-script.js, devtools/devtools.js, devtools/highlight.js (+1203 more).
R10 · Code Duplication · Forked directory tree (9 identical files, ~4155 lines × 2 trees) · ×1
  • Forked directory tree (9 identical files, ~4155 lines × 2 trees) docs/scripts/highlight.min.js:1 — docs/ and utils/docs/template/static/ are near-verbatim copies of each other: 9 files are byte-identical under the same relative paths (~4155 lines; the trees hold 1674 and 10 files). That is one structural fact, not 9 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
R10 · Code Duplication · Duplication concentrated across 14 sibling directories (61 clone groups) · ×1
  • Duplication concentrated across 14 sibling directories (61 clone groups) src/extras/PMREMGenerator.js:22 — 61 duplicated blocks under src/ have copies in at least two of the sibling directories audio, cameras, core, extras, geometries, helpers (+8 more sibling(s) not listed) — 27 of them are reported below, and 34 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 61 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 61 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 61 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 5 sibling directories (44 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (44 clone groups) src/renderers/webgl-fallback/utils/WebGLUtils.js:55 — 44 duplicated blocks under src/renderers/ have copies in at least two of the sibling directories common, webgl, webgl-fallback, webgpu, webxr — 34 of them are reported below, and 10 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 44 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 44 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 44 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 10 sibling directories (23 clone groups) · ×1
  • Duplication concentrated across 10 sibling directories (23 clone groups) src/nodes/core/StackNode.js:32 — 23 duplicated blocks under src/nodes/ have copies in at least two of the sibling directories accessors, code, core, display, functions, gpgpu (+4 more sibling(s) not listed) — 4 of them are reported below, and 19 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 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 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 23 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 6 sibling directories (15 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (15 clone groups) devtools/panel/panel.js:181 — 15 duplicated blocks under the repository root have copies in at least two of the sibling directories devtools, editor, manual, src, tsl, utils — 4 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 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 15 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 (197 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (197 matched lines × 2 locations) src/extras/PMREMGenerator.js:22 — src/extras/PMREMGenerator.js:22 · src/renderers/common/extras/PMREMGenerator.js:33 — the two spans are one implementation copied and then locally edited — 1488 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 (120 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (120 matched lines × 2 locations) src/renderers/WebGLRenderer.js:3383 — src/renderers/WebGLRenderer.js:3383 · src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:867 — the two spans are one implementation copied and then locally edited — 1155 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 (118 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (118 matched lines × 2 locations) src/renderers/webgl-fallback/utils/WebGLUtils.js:55 — src/renderers/webgl-fallback/utils/WebGLUtils.js:55 · src/renderers/webgl/WebGLUtils.js:8 — the two spans are one implementation copied and then locally edited — 1199 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 (100 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (100 matched lines × 2 locations) src/core/BufferAttribute.js:312 — src/core/BufferAttribute.js:312 · src/core/InterleavedBufferAttribute.js:125 — the two spans are one implementation copied and then locally edited — 732 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 (99 lines × 2 locations) · ×1
  • Duplicated block (99 lines × 2 locations) editor/js/libs/ui.js:533 — editor/js/libs/ui.js:533 · editor/js/libs/ui.js:754 — 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 (80 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (80 matched lines × 2 locations) src/renderers/common/XRManager.js:1676 — src/renderers/common/XRManager.js:1676 · src/renderers/webxr/WebXRManager.js:570 — the two spans are one implementation copied and then locally edited — 564 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 (76 identical lines × 2 files) · ×1
  • Wholesale file copy (76 identical lines × 2 files) tsl/js/imports/scripts/scenes/empty.js:1 — tsl/js/imports/scripts/scenes/empty.js:1 · tsl/js/imports/scripts/scenes/plane.js:1 — these 2 files are line-for-line copies of one another — 76 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 (70 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (70 matched lines × 2 locations) src/nodes/accessors/ReferenceBaseNode.js:17 — src/nodes/accessors/ReferenceBaseNode.js:17 · src/nodes/accessors/ReferenceNode.js:22 — the two spans are one implementation copied and then locally edited — 424 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 (65 lines × 2 locations) · ×1
  • Duplicated block (65 lines × 2 locations) src/materials/nodes/MeshPhongNodeMaterial.js:30 — src/materials/nodes/MeshPhongNodeMaterial.js:30 · src/materials/nodes/MeshStandardNodeMaterial.js:32 — 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 · Wholesale file copy (64 identical lines × 3 files) · ×1
  • Wholesale file copy (64 identical lines × 3 files) src/materials/MeshLambertMaterial.js:1 — src/materials/MeshLambertMaterial.js:1 · src/materials/MeshPhongMaterial.js:1 · src/materials/MeshStandardMaterial.js:2 — these 3 files are line-for-line copies of one another — 64 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 (64 lines × 2 locations) · ×1
  • Duplicated block (64 lines × 2 locations) src/renderers/common/XRManager.js:909 — src/renderers/common/XRManager.js:909 · src/renderers/common/XRManager.js:1004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (62 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (62 matched lines × 2 locations) src/math/Plane.js:21 — src/math/Plane.js:21 · src/math/Sphere.js:20 — the two spans are one implementation copied and then locally edited — 281 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 (53 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (53 matched lines × 2 locations) editor/js/Loader.js:238 — editor/js/Loader.js:238 · editor/js/Loader.js:560 — the two spans are one implementation copied and then locally edited — 297 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 (51 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (51 matched lines × 2 locations) src/cameras/OrthographicCamera.js:112 — src/cameras/OrthographicCamera.js:112 · src/cameras/PerspectiveCamera.js:129 — the two spans are one implementation copied and then locally edited — 348 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 (51 lines × 2 locations) · ×1
  • Duplicated block (51 lines × 2 locations) src/math/Vector3.js:230 — src/math/Vector3.js:230 · src/math/Vector4.js:291 — 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 (50 lines × 2 locations) · ×1
  • Duplicated block (50 lines × 2 locations) src/math/Euler.js:49 — src/math/Euler.js:49 · src/math/Quaternion.js:161 — 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 (48 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (48 matched lines × 2 locations) src/renderers/WebGLRenderer.js:1873 — src/renderers/WebGLRenderer.js:1873 · src/renderers/common/Renderer.js:3532 — the two spans are one implementation copied and then locally edited — 386 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 (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) src/extras/curves/LineCurve.js:9 — src/extras/curves/LineCurve.js:9 · src/extras/curves/LineCurve3.js:9 — 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 (42 lines × 3 locations) · ×1
  • Duplicated block (42 lines × 3 locations) editor/js/commands/SetPositionCommand.js:4 — editor/js/commands/SetPositionCommand.js:4 · editor/js/commands/SetRotationCommand.js:4 · editor/js/commands/SetScaleCommand.js:4 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (41 lines × 2 locations) · ×1
  • Duplicated block (41 lines × 2 locations) editor/js/commands/SetMaterialColorCommand.js:3 — editor/js/commands/SetMaterialColorCommand.js:3 · editor/js/commands/SetMaterialVectorCommand.js:3 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (40 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (40 matched lines × 2 locations) src/renderers/WebGLCubeRenderTarget.js:15 — src/renderers/WebGLCubeRenderTarget.js:15 · src/renderers/common/CubeRenderTarget.js:20 — the two spans are one implementation copied and then locally edited — 322 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 (39 lines × 5 locations) · ×1
  • Duplicated block (39 lines × 5 locations) src/nodes/accessors/Camera.js:85 — src/nodes/accessors/Camera.js:85 · src/nodes/accessors/Camera.js:131 · src/nodes/accessors/Camera.js:177 · src/nodes/accessors/Camera.js:223 · +1 more site(s) not listed — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
R10 · Code Duplication · Duplicated block (37 lines × 2 locations) · ×1
  • Duplicated block (37 lines × 2 locations) src/renderers/webgpu/nodes/WGSLNodeBuilder.js:423 — src/renderers/webgpu/nodes/WGSLNodeBuilder.js:423 · src/renderers/webgpu/nodes/WGSLNodeBuilder.js:1111 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R2 · Cyclomatic Complexity · Complex function WebGLProgram (cyclomatic 178, cognitive 340) · ×1
  • Complex function WebGLProgram (cyclomatic 178, cognitive 340) src/renderers/webgl/WebGLProgram.js:371 — WebGLProgram has cyclomatic complexity 178 and cognitive complexity 340; 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 fromJSON (cyclomatic 164, cognitive 166) · ×1
  • Complex function fromJSON (cyclomatic 164, cognitive 166) src/materials/Material.js:920 — fromJSON has cyclomatic complexity 164 and cognitive complexity 166; 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 parseBlock (cyclomatic 161, cognitive 20) · ×1
  • Complex function parseBlock (cyclomatic 161, cognitive 20) examples/jsm/loaders/lwo/LWO2Parser.js:9 — parseBlock has cyclomatic complexity 161 and cognitive complexity 20; 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 parseBlock (cyclomatic 145, cognitive 19) · ×1
  • Complex function parseBlock (cyclomatic 145, cognitive 19) examples/jsm/loaders/lwo/LWO3Parser.js:9 — parseBlock has cyclomatic complexity 145 and cognitive complexity 19; 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 setProgram (cyclomatic 128, cognitive 142) · ×1
  • Complex function setProgram (cyclomatic 128, cognitive 142) src/renderers/WebGLRenderer.js:2411 — setProgram has cyclomatic complexity 128 and cognitive complexity 142; 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 toJSON (cyclomatic 116, cognitive 118) · ×1
  • Complex function toJSON (cyclomatic 116, cognitive 118) src/materials/Material.js:610 — toJSON has cyclomatic complexity 116 and cognitive complexity 118; 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 getFormat (cyclomatic 115, cognitive 138) · ×1
  • Complex function getFormat (cyclomatic 115, cognitive 138) src/renderers/webgpu/utils/WebGPUTextureUtils.js:1481 — getFormat has cyclomatic complexity 115 and cognitive complexity 138; 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 getParameters (cyclomatic 100, cognitive 94) · ×1
  • Complex function getParameters (cyclomatic 100, cognitive 94) src/renderers/webgl/WebGLPrograms.js:54 — getParameters has cyclomatic complexity 100 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 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 getInternalFormat (cyclomatic 93, cognitive 156) · ×1
  • Complex function getInternalFormat (cyclomatic 93, cognitive 156) src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:165 — getInternalFormat has cyclomatic complexity 93 and cognitive complexity 156; 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 parseObject (cyclomatic 93, cognitive 125) · ×1
  • Complex function parseObject (cyclomatic 93, cognitive 125) src/loaders/ObjectLoader.js:784 — parseObject has cyclomatic complexity 93 and cognitive complexity 125; 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 toRGBA8 (cyclomatic 82, cognitive 196) · ×1
  • Complex function toRGBA8 (cyclomatic 82, cognitive 196) examples/jsm/libs/utif.module.js:1300 — toRGBA8 has cyclomatic complexity 82 and cognitive complexity 196; 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 _buildGeometryWithSubsets (cyclomatic 80, cognitive 107) · ×1
  • Complex function _buildGeometryWithSubsets (cyclomatic 80, cognitive 107) examples/jsm/loaders/usd/USDComposer.js:1922 — _buildGeometryWithSubsets has cyclomatic complexity 80 and cognitive complexity 107; 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 uploadTexture (cyclomatic 79, cognitive 315) · ×1
  • Complex function uploadTexture (cyclomatic 79, cognitive 315) src/renderers/webgl/WebGLTextures.js:962 — uploadTexture has cyclomatic complexity 79 and cognitive complexity 315; 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 getCallDetail (cyclomatic 78, cognitive 72) · ×1
  • Complex function getCallDetail (cyclomatic 78, cognitive 72) examples/jsm/inspector/tabs/Timeline.js:852 — getCallDetail has cyclomatic complexity 78 and cognitive complexity 72; 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 equals (cyclomatic 76, cognitive 123) · ×1
  • Complex function equals (cyclomatic 76, cognitive 123) src/materials/nodes/manager/NodeMaterialObserver.js:597 — equals has cyclomatic complexity 76 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 getInternalFormat (cyclomatic 74, cognitive 119) · ×1
  • Complex function getInternalFormat (cyclomatic 74, cognitive 119) src/renderers/webgl/WebGLTextures.js:132 — getInternalFormat has cyclomatic complexity 74 and cognitive complexity 119; 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 load (cyclomatic 72, cognitive 84) · ×1
  • Complex function load (cyclomatic 72, cognitive 84) REDACTED:1903 — load has cyclomatic complexity 72 and cognitive complexity 84; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parse (cyclomatic 67, cognitive 95) · ×1
  • Complex function parse (cyclomatic 67, cognitive 95) examples/jsm/libs/utif.module.js:12 — parse has cyclomatic complexity 67 and cognitive complexity 95; 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 · editor/js/libs/codemirror/codemirror.js · ×1
  • editor/js/libs/codemirror/codemirror.js: 8884 lines of code editor/js/libs/codemirror/codemirror.js:1 — editor/js/libs/codemirror/codemirror.js has 8884 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/common/Renderer.js · ×1
  • src/renderers/common/Renderer.js: 3023 lines of code src/renderers/common/Renderer.js:1 — src/renderers/common/Renderer.js has 3023 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/nodes/core/NodeBuilder.js · ×1
  • src/nodes/core/NodeBuilder.js: 2721 lines of code src/nodes/core/NodeBuilder.js:1 — src/nodes/core/NodeBuilder.js has 2721 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/WebGLRenderer.js · ×1
  • src/renderers/WebGLRenderer.js: 2473 lines of code src/renderers/WebGLRenderer.js:1 — src/renderers/WebGLRenderer.js has 2473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · editor/js/Strings.js · ×1
  • editor/js/Strings.js: 2423 lines of code editor/js/Strings.js:1 — editor/js/Strings.js has 2423 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/webgpu/WebGPUBackend.js · ×1
  • src/renderers/webgpu/WebGPUBackend.js: 2213 lines of code src/renderers/webgpu/WebGPUBackend.js:1 — src/renderers/webgpu/WebGPUBackend.js has 2213 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/webgpu/nodes/WGSLNodeBuilder.js · ×1
  • src/renderers/webgpu/nodes/WGSLNodeBuilder.js: 1900 lines of code src/renderers/webgpu/nodes/WGSLNodeBuilder.js:1 — src/renderers/webgpu/nodes/WGSLNodeBuilder.js has 1900 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/webgl-fallback/WebGLBackend.js · ×1
  • src/renderers/webgl-fallback/WebGLBackend.js: 1865 lines of code src/renderers/webgl-fallback/WebGLBackend.js:1 — src/renderers/webgl-fallback/WebGLBackend.js has 1865 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1718 lines of code REDACTED:1 — REDACTED has 1718 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1598 lines of code REDACTED:1 — REDACTED has 1598 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · editor/js/libs/ternjs/infer.js · ×1
  • editor/js/libs/ternjs/infer.js: 1497 lines of code editor/js/libs/ternjs/infer.js:1 — editor/js/libs/ternjs/infer.js has 1497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/webgl/WebGLTextures.js · ×1
  • src/renderers/webgl/WebGLTextures.js: 1442 lines of code src/renderers/webgl/WebGLTextures.js:1 — src/renderers/webgl/WebGLTextures.js has 1442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/common/XRManager.js · ×1
  • src/renderers/common/XRManager.js: 1408 lines of code src/renderers/common/XRManager.js:1 — src/renderers/common/XRManager.js has 1408 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js · ×1
  • src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js: 1323 lines of code src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js:1 — src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js has 1323 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/webgpu/utils/WebGPUTextureUtils.js · ×1
  • src/renderers/webgpu/utils/WebGPUTextureUtils.js: 1320 lines of code src/renderers/webgpu/utils/WebGPUTextureUtils.js:1 — src/renderers/webgpu/utils/WebGPUTextureUtils.js has 1320 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/core/Object3D.js · ×1
  • src/core/Object3D.js: 1244 lines of code src/core/Object3D.js:1 — src/core/Object3D.js has 1244 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/objects/BatchedMesh.js · ×1
  • src/objects/BatchedMesh.js: 1209 lines of code src/objects/BatchedMesh.js:1 — src/objects/BatchedMesh.js has 1209 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/webgl-fallback/utils/WebGLState.js · ×1
  • src/renderers/webgl-fallback/utils/WebGLState.js: 1046 lines of code src/renderers/webgl-fallback/utils/WebGLState.js:1 — src/renderers/webgl-fallback/utils/WebGLState.js has 1046 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/nodes/materialx/MaterialXNoise.js · ×1
  • src/nodes/materialx/MaterialXNoise.js: 1042 lines of code src/nodes/materialx/MaterialXNoise.js:1 — src/nodes/materialx/MaterialXNoise.js has 1042 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/nodes/core/Node.js · ×1
  • src/nodes/core/Node.js: 1039 lines of code src/nodes/core/Node.js:1 — src/nodes/core/Node.js has 1039 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/nodes/math/MathNode.js · ×1
  • src/nodes/math/MathNode.js: 1038 lines of code src/nodes/math/MathNode.js:1 — src/nodes/math/MathNode.js has 1038 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/math/Matrix4.js · ×1
  • src/math/Matrix4.js: 987 lines of code src/math/Matrix4.js:1 — src/math/Matrix4.js has 987 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/core/BufferGeometry.js · ×1
  • src/core/BufferGeometry.js: 977 lines of code src/core/BufferGeometry.js:1 — src/core/BufferGeometry.js has 977 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/materials/Material.js · ×1
  • src/materials/Material.js: 972 lines of code src/materials/Material.js:1 — src/materials/Material.js has 972 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/materials/nodes/NodeMaterial.js · ×1
  • src/materials/nodes/NodeMaterial.js: 965 lines of code src/materials/nodes/NodeMaterial.js:1 — src/materials/nodes/NodeMaterial.js has 965 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/math/Vector3.js · ×1
  • src/math/Vector3.js: 955 lines of code src/math/Vector3.js:1 — src/math/Vector3.js has 955 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · tsl/js/code/CodeCompiler.js · ×1
  • tsl/js/code/CodeCompiler.js: 942 lines of code tsl/js/code/CodeCompiler.js:1 — tsl/js/code/CodeCompiler.js has 942 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · tsl/js/utils/MarkdownUtils.js · ×1
  • tsl/js/utils/MarkdownUtils.js: 938 lines of code tsl/js/utils/MarkdownUtils.js:1 — tsl/js/utils/MarkdownUtils.js has 938 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · manual/resources/threejs-primitives.js · ×1
  • manual/resources/threejs-primitives.js: 930 lines of code manual/resources/threejs-primitives.js:1 — manual/resources/threejs-primitives.js has 930 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/webgl-fallback/utils/WebGLTextureUtils.js · ×1
  • src/renderers/webgl-fallback/utils/WebGLTextureUtils.js: 919 lines of code src/renderers/webgl-fallback/utils/WebGLTextureUtils.js:1 — src/renderers/webgl-fallback/utils/WebGLTextureUtils.js has 919 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · editor/js/libs/ternjs/tern.js · ×1
  • editor/js/libs/ternjs/tern.js: 881 lines of code editor/js/libs/ternjs/tern.js:1 — editor/js/libs/ternjs/tern.js has 881 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/nodes/display/PassNode.js · ×1
  • src/nodes/display/PassNode.js: 851 lines of code src/nodes/display/PassNode.js:1 — src/nodes/display/PassNode.js has 851 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · tsl/js/managers/PlaygroundManager.js · ×1
  • tsl/js/managers/PlaygroundManager.js: 836 lines of code tsl/js/managers/PlaygroundManager.js:1 — tsl/js/managers/PlaygroundManager.js has 836 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/webgl/WebGLState.js · ×1
  • src/renderers/webgl/WebGLState.js: 811 lines of code src/renderers/webgl/WebGLState.js:1 — src/renderers/webgl/WebGLState.js has 811 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/renderers/common/nodes/NodeManager.js · ×1
  • src/renderers/common/nodes/NodeManager.js: 806 lines of code src/renderers/common/nodes/NodeManager.js:1 — src/renderers/common/nodes/NodeManager.js has 806 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/nodes/accessors/TextureNode.js · ×1
  • src/nodes/accessors/TextureNode.js: 799 lines of code src/nodes/accessors/TextureNode.js:1 — src/nodes/accessors/TextureNode.js has 799 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/math/Vector4.js · ×1
  • src/math/Vector4.js: 797 lines of code src/math/Vector4.js:1 — src/math/Vector4.js has 797 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/loaders/ObjectLoader.js · ×1
  • src/loaders/ObjectLoader.js: 795 lines of code src/loaders/ObjectLoader.js:1 — src/loaders/ObjectLoader.js has 795 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/core/BufferAttribute.js · ×1
  • src/core/BufferAttribute.js: 789 lines of code src/core/BufferAttribute.js:1 — src/core/BufferAttribute.js has 789 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/nodes/tsl/TSLCore.js · ×1
  • src/nodes/tsl/TSLCore.js: 763 lines of code src/nodes/tsl/TSLCore.js:1 — src/nodes/tsl/TSLCore.js has 763 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No typecheck script · ×1
  • No typecheck script — test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~341 LoC) · ×1
  • Dead file (~341 LoC) utils/generateDFGLUT.js — no import path from any entry point (1570 application, 4 tooling, 294 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
R7 · Dead Code · Dead file (~306 LoC) · ×1
  • Dead file (~306 LoC) utils/packLDrawModel.mjs — no import path from any entry point (1570 application, 4 tooling, 294 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
R7 · Dead Code · Dead file (~201 LoC) · ×1
  • Dead file (~201 LoC) tsl/js/imports/scripts/scenes/shaderball.js — no import path from any entry point (1570 application, 4 tooling, 294 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
R7 · Dead Code · Dead file (~158 LoC) · ×1
  • Dead file (~158 LoC) tsl/js/imports/scripts/scenes/plane.js — no import path from any entry point (1570 application, 4 tooling, 294 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
R7 · Dead Code · Dead file (~140 LoC) · ×1
  • Dead file (~140 LoC) manual/resources/threejs-post-processing-3dlut.js — no import path from any entry point (1570 application, 4 tooling, 294 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
R7 · Dead Code · Dead file (~139 LoC) · ×1
  • Dead file (~139 LoC) tsl/js/imports/scripts/scenes/empty.js — no import path from any entry point (1570 application, 4 tooling, 294 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
R7 · Dead Code · Dead file (~39 LoC) · ×1
  • Dead file (~39 LoC) manual/resources/tools/geo-picking/make-geo-picking-texture-ogc.js — no import path from any entry point (1570 application, 4 tooling, 294 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
R8 · Dependency Hygiene · Unused dependency 'magic-string' · ×1
  • Unused dependency 'magic-string' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity editor/index.html:29 — `https://cdn.jsdelivr.net/gh/google/draco@1.5.7/javascript/draco_encoder.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×1
  • Recursive walk over a caller-supplied document has no depth cap src/nodes/core/StructNode.js:137 — `struct` is exported and takes `membersLayout: object` from its caller, and it calls itself at line 137 (`struct`) with a piece of `membersLayout` — and nowhere in `struct` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `struct` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Minor — 95 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate src/renderers/WebGLRenderer.js:1903 — `! object.frustumCulled || object.intersectsFrustum( frustum )` appears character-identically in 2 files — src/renderers/WebGLRenderer.js, src/renderers/common/Renderer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js:90 — `! this.trackTimestamp || this.isDisposed` appears character-identically in 2 files — src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js, src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate docs/scripts/page.js:1 — `! window.frameElement && window.location.protocol !== 'file:'` appears character-identically in 3 files — docs/scripts/page.js, manual/resources/lesson.js, utils/docs/template/static/scripts/page.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/extras/ImageUtils.js:75 — `( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || ( typeof HTMLCanvasElement !== 'undefined' && image inst…` appears character-identically in 2 files — src/extras/ImageUtils.js, src/textures/TextureSource.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderers/common/Geometries.js:272 — `attribute.isStorageBufferAttribute || attribute.isStorageInstancedBufferAttribute` appears character-identically in 4 files — src/renderers/common/Geometries.js, src/renderers/webgl-fallback/WebGLBackend.js, src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js, src/renderers/webgpu/WebGPUBackend.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/math/Box2.js:375 — `box.min.equals( this.min ) && box.max.equals( this.max )` appears character-identically in 2 files — src/math/Box2.js, src/math/Box3.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/nodes/accessors/BufferAttributeNode.js:284 — `builder.shaderStage === 'vertex' || builder.shaderStage === 'compute'` appears character-identically in 2 files — src/nodes/accessors/BufferAttributeNode.js, src/nodes/core/IndexNode.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/nodes/accessors/Bitangent.js:56 — `builder.subBuildFn === 'VERTEX' || builder.geometry.hasAttribute( 'tangent' )` appears character-identically in 2 files — src/nodes/accessors/Bitangent.js, src/nodes/accessors/Tangent.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/nodes/accessors/Camera.js:89 — `camera.isArrayCamera && camera.cameras.length > 0` appears character-identically in 3 files — src/nodes/accessors/Camera.js, src/nodes/accessors/Lights.js, src/nodes/accessors/ModelNode.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderers/WebGLRenderer.js:1671 — `camera.parent === null && camera.matrixWorldAutoUpdate === true` appears character-identically in 2 files — src/renderers/WebGLRenderer.js, src/renderers/common/Renderer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderers/webgl-fallback/WebGLBackend.js:1249 — `cameraData.indexesGPU === undefined || cameraData.indexesGPU.length !== cameras.length` appears character-identically in 2 files — src/renderers/webgl-fallback/WebGLBackend.js, src/renderers/webgpu/WebGPUBackend.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate manual/resources/threejs-align-html-elements-to-3d.js:138 — `canvas.width !== width || canvas.height !== height` appears character-identically in 2 files — manual/resources/threejs-align-html-elements-to-3d.js, manual/resources/threejs-lesson-utils.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderers/common/RenderList.js:403 — `customTransparentSort || reversePainterSortStable` appears character-identically in 2 files — src/renderers/common/RenderList.js, src/renderers/webgl/WebGLRenderLists.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tsl/js/code/CodeCompiler.js:450 — `decl.type === 'FunctionDeclaration' || decl.type === 'ClassDeclaration'` appears character-identically in 2 files — tsl/js/code/CodeCompiler.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/objects/Line.js:343 — `distance < raycaster.near || distance > raycaster.far` appears character-identically in 4 files — src/objects/Line.js, src/objects/Mesh.js, src/objects/Points.js, src/objects/Sprite.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderers/WebGLRenderer.js:3606 — `dstLevel === 0 && dstTexture.generateMipmaps === true && dstTexture.mipmapsAutoUpdate === true` appears character-identically in 3 files — src/renderers/WebGLRenderer.js, src/renderers/webgl-fallback/utils/WebGLTextureUtils.js, src/renderers/webgpu/WebGPUBackend.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/nodes/accessors/Morph.js:107 — `entry === undefined || entry.count !== morphTargetsCount` appears character-identically in 2 files — src/nodes/accessors/Morph.js, src/renderers/webgl/WebGLMorphtargets.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/nodes/lighting/EnvironmentNode.js:65 — `envNode.isTextureNode || envNode.isMaterialReferenceNode` appears character-identically in 2 files — src/nodes/lighting/EnvironmentNode.js, src/nodes/utils/CubeMapNode.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/materials/nodes/NodeMaterial.js:770 — `geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color` appears character-identically in 5 files — src/materials/nodes/NodeMaterial.js, src/nodes/accessors/Morph.js, src/renderers/WebGLRenderer.js, src/renderers/webgl/WebGLMorphtargets.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate editor/js/Selector.js:265 — `helper !== undefined && helper.isSkeletonHelper !== true` appears character-identically in 2 files — editor/js/Selector.js, editor/js/Viewport.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate docs/scripts/page.js:63 — `href.startsWith( '#' ) || ( target.hostname === window.location.hostname && target.pathname === window.location.pathname )` appears character-identically in 2 files — docs/scripts/page.js, utils/docs/template/static/scripts/page.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/materials/nodes/manager/NodeMaterialObserver.js:1068 — `index !== null && attributes.has( index ) === false` appears character-identically in 2 files — src/materials/nodes/manager/NodeMaterialObserver.js, src/renderers/common/Renderer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderers/common/XRManager.js:1908 — `inputSource !== null && controller !== undefined` appears character-identically in 2 files — src/renderers/common/XRManager.js, src/renderers/webxr/WebXRManager.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderers/webgl-fallback/WebGLBackend.js:1174 — `lastObject !== null && lastObject.occlusionTest === true` appears character-identically in 2 files — src/renderers/webgl-fallback/WebGLBackend.js, src/renderers/webgpu/WebGPUBackend.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderers/webgl-fallback/WebGLBackend.js:561 — `lastOcclusionObject && lastOcclusionObject.occlusionTest === true` appears character-identically in 2 files — src/renderers/webgl-fallback/WebGLBackend.js, src/renderers/webgpu/WebGPUBackend.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.
D29 · Static Analysis (SAST) · REDACTED · ×22
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned file · ×13
  • Orphaned file manual/resources/tools/geo-picking/shapefile.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/renderers/webgl/WebGLBindingStates.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/threejs-materials.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/threejs-lesson-utils.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/threejs-textures.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/threejs-align-html-elements-to-3d.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/tools/geo-picking/ogc-parser.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/tools/geo-picking/make-geo-picking-texture.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/geometries/CapsuleGeometry.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/threejs-fog.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/threejs-lots-of-objects.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/threejs-lights.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file manual/resources/threejs-post-processing-3dlut.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
IC1 · Incompleteness & stubs · Empty method body · ×6
  • Empty method body build/three.core.js:4763 — `_onChangeCallback` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body build/three.core.js:11755 — `_onChangeCallback` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body build/three.core.js:53781 — `_setValue_unavailable` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body REDACTED:328 — `_setValue_unavailable` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body src/math/Euler.js:427 — `_onChangeCallback` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body src/math/Quaternion.js:895 — `_onChangeCallback` has an empty body — confirm it's an intentional no-op and not an unfinished method.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×4
  • Hand-rolled JSON/XML parsing via regex REDACTED:1210 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex tsl/js/managers/ConsoleManager.js:167 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex tsl/js/utils/MarkdownUtils.js:35 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex utils/llms/build.js:549 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 17 significant file(s) lose their only recent owner: editor/js/Animation.js, editor/js/Sidebar.Material.MapProperty.js, editor/js/libs/tern-threejs/build-defs.js, src/nodes/accessors/VelocityNode.js, editor/js/Sidebar.Settings.Shortcuts.js, manual/resources/threejs-material-table.js, src/geometries/SphereGeometry.js, src/scenes/Scene.js (+9 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 9 significant file(s) lose their only recent owner: tsl/js/code/CodeCompiler.js, REDACTED, tsl/js/editor/CodeEditor.js, tsl/js/managers/ConsoleManager.js, src/nodes/core/OverrideContextNode.js, src/nodes/code/FunctionCallNode.js, src/nodes/core/StructNode.js, src/nodes/core/InspectorNode.js (+1 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 8 significant file(s) lose their only recent owner: utils/llms/build.js, src/renderers/webgl/WebGLLights.js, src/renderers/webgl/WebGLUniformsGroups.js, utils/generateDFGLUT.js, src/renderers/shaders/DFGLUTData.js, src/core/UniformsGroup.js, editor/js/Sidebar.Geometry.BufferGeometry.js, src/renderers/shaders/ShaderLib/meshlambert.glsl.js. Pair on, review, or document these before any departure.
D19 · Documentation Quality · Documentation · ×3
  • Documentation: no project overview README.md — The README begins with an NPM badge and a list of links (Examples, Docs, Manual, Wiki) but does not state what the project is or what it does; the heading 'JavaScript 3D library' names the product without explaining its purpose. Add one sentence stating the three.js repository's goal: an easy-to-use lightweight cross-browser general-purpose 3D library.
  • Documentation: no project overview examples/models/gltf/MaterialsVariantsShoe/README.md — The document is a subdirectory README describing its own directory (Materials Variants Shoe) and has no sentence stating what the repository's root project does or how to get started. Add an overview line at the top of the file explaining that this is an example model showing glTF materials variants sharing geometry/textures, and where to find the full repository.
  • Documentation: no project overview examples/models/gltf/Nefertiti/README.md — The document is a subdirectory README describing its own directory (Nefertiti) and has no sentence stating what the repository's root project does or how to get started. Add an overview line at the top of the file explaining that this is an example model showing glTF materials variants sharing geometry/textures, and where to find the full repository.
IC1 · Incompleteness & stubs · Blanket warning suppression · ×2
  • Blanket warning suppression build/three.core.js:34545 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression src/extras/lib/earcut.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
M4 · Documentation accuracy · README/code drift · ×2
  • README/code drift docs/pages/ClusteredLighting.html.md:68 — docs/pages/ClusteredLighting.html.md links to `Lighting.html#createNode`, but `docs/pages/Lighting.html` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/pages/DynamicLighting.html.md:72 — docs/pages/DynamicLighting.html.md links to `Lighting.html#createNode`, but `docs/pages/Lighting.html` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
S1 · Web-Security Posture · No app-layer HTTPS enforcement detected · ×2
  • No app-layer HTTPS enforcement detected utils/server.js:197 — `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
  • No app-layer HTTPS enforcement detected utils/server.js:216 — `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
X7 · Silent fallback defaults · Silent fallback default in catch · ×2
  • Silent fallback default in catch editor/js/libs/codemirror/codemirror.js:7657 — `gutterEvent` swallows every exception into `return false` — 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.
  • Silent fallback default in catch utils/changelog.js:71 — `exec` 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.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 8 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 (42 single-owned of 486 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; 486 of the 905 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)) (+2 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/animation/AnimationObjectGroup.js, src/geometries/PolyhedronGeometry.js, src/extras/curves/CatmullRomCurve3.js, src/extras/core/CurvePath.js, src/geometries/EdgesGeometry.js, editor/js/Storage.js, src/textures/CompressedTexture.js, src/nodes/accessors/StorageTexture3DNode.js.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (535335 LoC, 2375 module-visible types across 139 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 13 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: manual/resources/tools/geo-picking/shapefile.js, src/renderers/webgl/WebGLBindingStates.js, manual/resources/threejs-materials.js, manual/resources/threejs-lesson-utils.js, manual/resources/threejs-textures.js, manual/resources/threejs-align-html-elements-to-3d.js, manual/resources/tools/geo-picking/ogc-parser.js, manual/resources/tools/geo-picking/make-geo-picking-texture.js (and 5 more) (14 orphaned of 489 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; 489 of the 905 production source files in this repository met that bar). 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.
D9 · Test Distribution · No tests found · ×1
  • No tests found — No test suite could be collected — no discoverable tests to count. If this repository does test, wiring the suite to a framework a runner can collect (Vitest, Jest, Mocha, or the runtime's built-in runner (`node --test`, `bun test`, `deno test`)) is what makes it countable here; a pipeline step that invokes a runner is not evidence on its own, because a runner over an empty suite passes. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here.
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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
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.)
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 0/4 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Minor — 1 finding(s)
D12 · Dependency Hygiene · Dependency hygiene PARTLY measured · ×1
  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile resolved no direct production dependency) — This repository's npm dependencies were read for PINNING discipline: 0 production declaration(s) plus 16 development one(s) across 1 package.json (1 of them the product — the rest are example, documentation or fixture manifests, which are read and counted but screened off the rules below, because both prescribe a MOVE and "align your example apps" is not a remedy), against 1 committed lockfile(s). No pinning defect was found. That is only PART of dependency hygiene, so this dimension is NOT SCORED: whether any of these packages has a newer, deprecated or abandoned release is the dependency-CURRENCY question, and answering it needs concrete resolved versions. This repository's committed lockfile WAS read and it resolves no direct production dependency to grade — a package.json states version RANGES, which name no particular release to be behind. That is a fact about this repository, not a reader we are missing. A clean pinning pass is NOT an all-clear for these dependencies, and it is not a finding that they are all USED. Note also what is deliberately NOT charged here: a workspace legitimately carries ONE lockfile for many manifests, so no row is raised off the lockfile count, only reported. Known CVEs in the same dependency graph are a separate question again, reported under D30 wherever the manifest is OSV-readable.

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-16a4f7d9a38144c48d8d25484444626f/history.json --exit-code 0 --source .144artifacts/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-16a4f7d9a38144c48d8d25484444626f/tree.json --exit-code 0 --source .62artifacts/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 .63artifacts/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-update2artifacts/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. semgrep could not parse 7 file(s) — `src/math/Matrix2.js`, `src/math/Matrix3.js`, `src/math/Matrix4.js`, `src/math/Vector2.js`, `src/math/Vector3.js`, … (+2 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.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 01a16db9-71d5-7b07-ba51-80eb7d8a6d09 · 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