Preparing search index...

    Represents a 2D point with x and y coordinates.

        // Editor.Point is a simple 2D integer coordinate (x, y). Plugins use it
    // as a lightweight tuple for mouse positions, grid coordinates, and UI
    // placement offsets — anywhere a pair of ints is clearer than vec2.
    //
    // Typical example: translating a Widget drop location into a grid cell.
    const dropPosition = new Editor.Point();
    dropPosition.x = 137;
    dropPosition.y = 92;

    const cellSize = 32;
    const gridCell = new Editor.Point();
    gridCell.x = Math.floor(dropPosition.x / cellSize);
    gridCell.y = Math.floor(dropPosition.y / cellSize);

    console.log(`Drop at (${dropPosition.x}, ${dropPosition.y}) -> cell (${gridCell.x}, ${gridCell.y})`);
    Index

    Constructors

    Properties

    x y

    Constructors

    • Constructs a new Point instance with default x and y values of zero.

      Returns Point

    Properties

    x: number

    Horizontal coordinate of the point.

    y: number

    Vertical coordinate of the point.