2021-10-17 18:26:00 +02:00
|
|
|
---
|
2022-09-27 18:24:35 +02:00
|
|
|
title: Path.start()
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-27 18:24:35 +02:00
|
|
|
The `Path.start()` method returns the Point object at the start of the path.
|
|
|
|
|
|
|
|
## Signature
|
|
|
|
|
2021-08-25 16:09:31 +02:00
|
|
|
```js
|
|
|
|
Point path.start()
|
|
|
|
```
|
|
|
|
|
2024-09-29 07:14:59 +02:00
|
|
|
:::tip
|
|
|
|
This method is chainable as it returns the `Path` object
|
|
|
|
:::
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-27 18:24:35 +02:00
|
|
|
## Example
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-27 18:24:35 +02:00
|
|
|
<Example caption="Example of the Path.start() method">
|
2021-08-25 16:09:31 +02:00
|
|
|
```js
|
2022-09-27 18:24:35 +02:00
|
|
|
({ Point, points, Path, paths, snippets, Snippet, part }) => {
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2024-09-29 07:14:59 +02:00
|
|
|
points.A = new Point(45, 60)
|
|
|
|
points.B = new Point(10, 30)
|
|
|
|
points.BCp2 = new Point(40, 20)
|
|
|
|
points.C = new Point(90, 30)
|
|
|
|
points.CCp1 = new Point(50, -30)
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2024-09-29 07:14:59 +02:00
|
|
|
paths.demo = new Path()
|
|
|
|
.move(points.A)
|
|
|
|
.line(points.B)
|
|
|
|
.curve(points.BCp2, points.CCp1, points.C)
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2024-09-29 07:14:59 +02:00
|
|
|
snippets.end = new Snippet("notch", paths.demo.start())
|
2022-09-27 18:24:35 +02:00
|
|
|
|
2024-09-29 07:14:59 +02:00
|
|
|
return part
|
2022-09-27 18:24:35 +02:00
|
|
|
}
|
2024-09-29 07:14:59 +02:00
|
|
|
|
2021-08-25 16:09:31 +02:00
|
|
|
```
|
2022-09-27 18:24:35 +02:00
|
|
|
</Example>
|
2024-09-29 07:14:59 +02:00
|
|
|
```
|