Skip to content

Commit

Permalink
Merge pull request #626 from jonobr1/issue-625
Browse files Browse the repository at this point in the history
Fixed Two.Path.ending when Two.Path.curved = true
  • Loading branch information
jonobr1 authored Apr 27, 2022
2 parents 85e4099 + 949ad09 commit e433336
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -1022,15 +1022,21 @@ export class Path extends Shape {
// of the in-between point
if (prev && prev.controls) {

if (v.controls.relative) {
if (v.relative) {
v.controls.right.clear();
} else {
v.controls.right.copy(v);
}

this._renderer.collection[i - 1].controls.right
.copy(prev)
.lerp(prev.controls.right, v.t);
if (prev.relative) {
this._renderer.collection[i - 1].controls.right
.copy(prev.controls.right)
.lerp(Vector.zero, 1 - v.t);
} else {
this._renderer.collection[i - 1].controls.right
.copy(prev.controls.right)
.lerp(prev, 1 - v.t);
}

}

Expand Down
4 changes: 4 additions & 0 deletions wiki/changelog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ All notable changes to this project will be documented in this file. The format

<carbon-ads />

## Nightly

+ Fixed `Two.Path.ending` when `Two.Path.curved = true`

## Mar 29, 2022 v0.8.4

<h3 class="visible">Mar 29, 2022</h3><version-link v="v0.8.4" />
Expand Down

0 comments on commit e433336

Please sign in to comment.