Skip to content

Roundish figures' flat shadow fail #1

@ivantodorovich

Description

@ivantodorovich

In some situations, roundish figures' flat shadow fail like this:
icon (2)
icon (3)

Playing with the icon size can affect the result.

I've tracked this down to the following line:

facePaths.reduce((path1, path2) => path1.unite(path2, {insert: false})) :

It seems to be a bug in paperjs, that fails to perform this unite operations:

const pathData1 = "M35,63.5c7.87004,0 14.99504,-3.18998 20.15253,-8.34747l-49.49747,49.49747c-5.15749,5.15749 -12.28249,8.34747 -20.15253,8.34747z"
const pathData2 = "M55.15253,55.15253c5.15749,-5.15749 8.34747,-12.28249 8.34747,-20.15253l-49.49747,49.49747c0,7.87004 -3.18998,14.99504 -8.34747,20.15253z";

const path1 = new paper.Path(pathData1);
const path2 = new paper.Path(pathData2);

const path3 = path1.unite(path2);
path3.fillColor = "red";

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions