Position vector of the node
Velocity vector for physics simulation
Force vector accumulator for physics simulation
Visual size of the node in pixels
Whether the node is fixed in position
Dynamic width for rectangular nodes (calculated by renderer)
Dynamic height for rectangular nodes (calculated by renderer)
ReadonlydataNode data containing id, name, and other properties
Reset the node's position to a random location within the specified bounds This also resets velocity to zero but preserves the fixed state for position
New container width
New container height
Fix the node at its current position and reset velocity Fixed nodes will not be affected by physics forces
Unfix the node, allowing it to move freely with physics
Get the display name of the node
The node's display name
Get the unique identifier of the node
The node's unique ID
Get the type of the node for styling and grouping
The node's type or undefined if not specified
Get the shape of the node for rendering
The node's shape or 'circle' as default
Check if this node has the same type as another node
Other node to compare with
True if both nodes have the same type
Calculate the distance to another node
Other node
Distance between nodes
Apply a force to this node (accumulates with existing force)
Force vector to apply
Reset the accumulated force to zero
Update the node's position based on current velocity and force This is typically called by the physics engine
Time step for integration (default: 1)
Velocity damping factor (default: 0.95)
Get the effective radius for collision detection Takes into account different shapes and dynamic sizing
Effective radius for physics calculations
Convert node to a serializable object
Object representation including data and current state
Create a string representation of the node
String representation
StaticfromCreate a node from a serialized object
Serialized node object
OptionalcontainerWidth: numberContainer width (if position should be reset)
OptionalcontainerHeight: numberContainer height (if position should be reset)
New node instance
Node class representing a graph node with position, velocity, and force vectors Enhanced with full TypeScript support and generic node data