melonjs
    Preparing search index...

    Class ObservablePoint

    Represents an observable point in 2D space.

    Index

    Constructors

    Properties

    Accessors

    x y

    Methods

    Constructors

    • Creates a new ObservablePoint instance.

      Parameters

      • x: number = 0

        The x-coordinate of the point. Default is 0.

      • y: number = 0

        The y-coordinate of the point. Default is 0.

      • Optionalcallback: () => void

        The callback function to be called when the point changes. Default is undefined.

      Returns ObservablePoint

    Properties

    type: "ObservablePoint"

    Accessors

    Methods

    • Checks if the point is equal to the given coordinates or another ObservablePoint.

      Parameters

      • x: number

        The x-coordinate or the ObservablePoint to compare.

      • y: number

        The y-coordinate. Required if the first parameter is a number.

      Returns boolean

      True if the point is equal to the given coordinates or another ObservablePoint, false otherwise.

    • Checks if the point is equal to the given coordinates or another ObservablePoint.

      Parameters

      Returns boolean

      True if the point is equal to the given coordinates or another ObservablePoint, false otherwise.