fromJSON MethodStatic

Set x and y from a JSON input such as [1,2] or {x:1, y:2}

  • If no JSON input is provided, 0 would be used as default values for x and y.

fromJSON(json?: XYProps): Vector2d

Parameter Type Description
json XYProps the JSON input

Returns - Vector2d

Defined in

Last Updated: 14 November, 2024