Remove unused scripts/dead code and fix README accuracy#80
Conversation
|
@copilot Is it complete? Does everything works as designed? Is it ready to merge to prod? |
Co-authored-by: overdeckat <263444311+overdeckat@users.noreply.github.com>
Yes, it's complete and verified — here's what was confirmed: All 10 HTML pages: every Script-load cleanup (commit
Dead-code removal (
All shared modules wired correctly:
Ready to merge. |
There was a problem hiding this comment.
Pull request overview
This PR reduces unused client-side script loading across the mechanical-test simulation pages, removes unused/duplicated graph-renderer functionality now covered by graph-modal.js, and updates the README to accurately reflect current module/material/effects scope.
Changes:
- Removed unused
<script>loads (physics.jsacross mechanical tests;particle-system.jsfrom fatigue simulations). - Deleted unused expanded-graph drawing methods from
src/js/graph-renderer.js(modal graphs are handled bygraph-modal.js). - Corrected README module scope, materials breakdown, and visual-effects notes.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| trazione.html | Stops loading physics.js (keeps only modules used by tensile simulation). |
| compressione.html | Stops loading physics.js (keeps only modules used by compression simulation). |
| flessione.html | Stops loading physics.js (keeps only modules used by bending simulation). |
| torsione.html | Stops loading physics.js (torsion uses particle effects but not Physics). |
| taglio.html | Stops loading physics.js (shear uses particle effects but not Physics). |
| fatica-flessione.html | Stops loading physics.js and particle-system.js (fatigue sim does geometry-based cracking). |
| fatica-termica.html | Stops loading physics.js and particle-system.js (fatigue sim does geometry-based cracking). |
| src/js/graph-renderer.js | Removes unused expanded-graph functions duplicated by modal implementation. |
| README.md | Updates documentation to match actual module usage/material tables/effects implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Several modules were loaded by simulations that never used them, and
graph-renderer.jscontained dead methods duplicated bygraph-modal.js. The README made false claims about material sharing and visual effects coverage.Script load cleanup
physics.jsfrom all 7 mechanical test HTML files — thePhysicsobject is only consumed bysim-2d.js/sim-3d.jsparticle-system.jsfromfatica-flessione.htmlandfatica-termica.html— both fatigue sims implement crack visuals directly onTHREE.PlaneGeometryand never call anyParticleSystem.*methodDead code removal (
graph-renderer.js, −170 lines)drawExpandedPositionGraphanddrawExpandedEnergyGraphwere defined but never called;graph-modal.jsalready has its own parallel implementations. Both methods removed.README corrections
shared-materials.jsdescribed as shared across all simulatorsparticle-system.jsdescribed without scopeparticle-system.jsOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.