MCPcopy Create free account
hub / github.com/DFin/Neural-Network-Visualisation / disposeConnectionMeshes

Method disposeConnectionMeshes

assets/main.js:2678–2694  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2676 }
2677
2678 disposeConnectionMeshes() {
2679 this.connectionGroups.forEach((group) => {
2680 this.scene.remove(group.mesh);
2681 if (group.mesh.geometry && typeof group.mesh.geometry.dispose === "function") {
2682 group.mesh.geometry.dispose();
2683 }
2684 const material = group.mesh.material;
2685 if (Array.isArray(material)) {
2686 material.forEach((mat) => {
2687 if (mat && typeof mat.dispose === "function") mat.dispose();
2688 });
2689 } else if (material && typeof material.dispose === "function") {
2690 material.dispose();
2691 }
2692 });
2693 this.connectionGroups = [];
2694 }
2695
2696 updateNetworkWeights() {
2697 this.disposeConnectionMeshes();

Callers 1

updateNetworkWeightsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected