@@ -7,7 +7,7 @@ class NeuralNetwork {
77 /**
88 * Creates a new NeuralNetwork instance and initializes the animation.
99 * Sets up canvas, particles, event listeners, and starts the animation loop.
10- *
10+ *
1111 * @constructor
1212 */
1313 constructor ( ) {
@@ -32,8 +32,8 @@ class NeuralNetwork {
3232 /** @type {number } Maximum distance for mouse interaction with particles (in pixels) */
3333 this . mouseDistance = 200 ;
3434
35- /**
36- * @type {{x: number|null, y: number|null} }
35+ /**
36+ * @type {{x: number|null, y: number|null} }
3737 * Current mouse position, null when mouse is outside canvas
3838 */
3939 this . mouse = {
@@ -52,7 +52,7 @@ class NeuralNetwork {
5252 /**
5353 * Initializes the neural network by setting canvas size and creating particles.
5454 * Called once during construction.
55- *
55+ *
5656 * @returns {void }
5757 */
5858 init ( ) {
@@ -63,7 +63,7 @@ class NeuralNetwork {
6363 /**
6464 * Handles window resize events by adjusting canvas dimensions and recreating particles
6565 * to maintain consistent particle density across different screen sizes.
66- *
66+ *
6767 * @returns {void }
6868 */
6969 resize ( ) {
@@ -76,15 +76,15 @@ class NeuralNetwork {
7676 * Creates particles with random positions and velocities.
7777 * Particle count is calculated based on canvas area to maintain consistent density.
7878 * Each particle has position (x, y), velocity (vx, vy), size, and color.
79- *
79+ *
8080 * @typedef {Object } Particle
8181 * @property {number } x - X coordinate position
8282 * @property {number } y - Y coordinate position
8383 * @property {number } vx - X velocity component
8484 * @property {number } vy - Y velocity component
8585 * @property {number } size - Particle radius
8686 * @property {string } color - Particle color (hex format)
87- *
87+ *
8888 * @returns {void }
8989 */
9090 createParticles ( ) {
@@ -108,7 +108,7 @@ class NeuralNetwork {
108108
109109 /**
110110 * Handles mouse move events and updates the mouse position for particle interaction.
111- *
111+ *
112112 * @param {MouseEvent } e - The mouse event object
113113 * @returns {void }
114114 */
@@ -120,7 +120,7 @@ class NeuralNetwork {
120120 /**
121121 * Handles mouse out events by resetting mouse position to null,
122122 * disabling particle interaction when mouse leaves the window.
123- *
123+ *
124124 * @returns {void }
125125 */
126126 handleMouseOut ( ) {
@@ -133,15 +133,15 @@ class NeuralNetwork {
133133 * Handles particle physics (movement, boundary collision), mouse interaction,
134134 * connection drawing, pulse spawning, and pulse animation.
135135 * Uses requestAnimationFrame for smooth 60fps animation.
136- *
136+ *
137137 * @typedef {Object } Pulse
138138 * @property {number } x - Starting X coordinate
139139 * @property {number } y - Starting Y coordinate
140140 * @property {number } targetX - Target X coordinate
141141 * @property {number } targetY - Target Y coordinate
142142 * @property {number } progress - Animation progress (0 to 1)
143143 * @property {number } speed - Speed of pulse movement per frame
144- *
144+ *
145145 * @returns {void }
146146 */
147147 animate ( ) {
0 commit comments