diff --git a/app/script/Field3D.js b/app/script/Field3D.js index cc07ec4..3a617df 100644 --- a/app/script/Field3D.js +++ b/app/script/Field3D.js @@ -123,8 +123,8 @@ class ElectricFieldVectors3D extends THREE.Object3D { constructor(point_charges) { super(); this.point_charges = point_charges; - this.createEFVectorGeometry(); this.geometry = new THREE.ConeGeometry(1, 5, 10); + this.createEFVectorGeometry(); } createEFVectorGeometry = () => { @@ -207,7 +207,7 @@ export class Field3D extends THREE.Object3D { if (enable) { if (this.electric_field_vectors_3d == null) this.electric_field_vectors_3d = new ElectricFieldVectors3D(this.point_charges); - else + else; this.electric_field_vectors_3d.update(); this.add(this.electric_field_vectors_3d); } diff --git a/app/script/main.js b/app/script/main.js index cb6214e..fd4c05f 100644 --- a/app/script/main.js +++ b/app/script/main.js @@ -3,7 +3,6 @@ import * as EFSim from "./Init.js"; import { Dragger } from "./Dragger.js"; import PointCharge from "./PointCharge.js"; import { Field3D } from "./Field3D.js"; -import debounce from 'debounce'; import { throttle } from 'throttle-debounce'; import { Measure } from "./Measure.js";