Version:

setTo([x1], [y1], [x2], [y2], [x3], [y3])

Sets the data for the lines that make up this Triangle shape.

name | type | arguments | description |
---|---|---|---|

x1 | number | <optional> |
The horizontal position of the first point in the triangle. |

y1 | number | <optional> |
The vertical position of the first point in the triangle. |

x2 | number | <optional> |
The horizontal position of the second point in the triangle. |

y2 | number | <optional> |
The vertical position of the second point in the triangle. |

x3 | number | <optional> |
The horizontal position of the third point in the triangle. |

y3 | number | <optional> |
The vertical position of the third point in the triangle. |

This Game Object instance.

Since: 3.13.0

Possible examples