神岛 API 文档 - ArenaPro版
    Preparing search index...

    二维向量

    2D vector

    Index

    Properties

    x y

    Methods

    Properties

    x: number

    Vec2 的 x 坐标。

    The x-coordinate of the Vec2.

    y: number

    Vec2 的 y 坐标。

    The y-coordinate of the Vec2.

    Methods

    • Parameters

      Returns void

      复制给定的 Vec2 的 x 和 y 到当前 Vec2。

      Copies the x and y of the given Vec2 to the current Vec2.

      节点坐标数据。

      Node coordinate data.

    • Parameters

      • Optionalval: Vec2 | { x: number; y: number }

      Returns Vec2

      创建并返回一个新的 Vec2。如果提供了一个 Vec2 作为参数,新的 Vec2 的 x 和 y 将被设置为给定 Vec2 的 x 和 y。如果没有提供参数,新的 Vec2 的 x 和 y 将被设置为 0。

      Creates and returns a new Vec2. If a Vec2 is provided as an argument, the new Vec2's x and y will be set to the given Vec2's x and y. If no argument is provided, the new Vec2's x and y will be set to 0.

      节点坐标数据。

      Node coordinate data.