ixfx
    Preparing search index...

    Type Alias ForceAffected

    Basic properties of a thing that can be affected by forces

    type ForceAffected = {
        acceleration?: Point;
        angle?: number;
        angularAcceleration?: number;
        angularVelocity?: number;
        mass?: number;
        position?: Point;
        velocity?: Point;
    }
    Index

    Properties

    acceleration?: Point

    Acceleration vector. Most applied forces will alter the acceleration, culminating in a new velocity being set and the acceleraton value zeroed

    angle?: number
    angularAcceleration?: number
    angularVelocity?: number
    mass?: number

    Mass. The unit is undefined, again best to think of this being on a 0..1 scale. Mass is particularly important for the attraction/repulsion force, but other forces can incorporate mass too.

    position?: Point

    Position. Probably best to use relative coordinates

    velocity?: Point

    Velocity vector. Probably don't want to assign this yourself, but rather have it computed based on acceleration and applied forces