ixfx
    Preparing search index...

    Type Alias ForceAffected

    ForceAffected: {
        acceleration?: Geometry.Point;
        angle?: number;
        angularAcceleration?: number;
        angularVelocity?: number;
        mass?: number;
        position?: Geometry.Point;
        velocity?: Geometry.Point;
    }

    Basic properties of a thing that can be affected by forces

    Type declaration

    • Optional Readonlyacceleration?: Geometry.Point

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

    • Optional Readonlyangle?: number
    • Optional ReadonlyangularAcceleration?: number
    • Optional ReadonlyangularVelocity?: number
    • Optional Readonlymass?: 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.

    • Optional Readonlyposition?: Geometry.Point

      Position. Probably best to use relative coordinates

    • Optional Readonlyvelocity?: Geometry.Point

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